daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
803fb7
From d5b06145261637bcb69c1a213874cce10918a189 Mon Sep 17 00:00:00 2001
803fb7
From: Lennart Poettering <lennart@poettering.net>
803fb7
Date: Mon, 18 May 2015 23:38:47 +0200
803fb7
Subject: [PATCH] resolved: allow DnsAnswer objects with no space for RRs
803fb7
803fb7
They might be created as result of merged answer sets, hence accept
803fb7
them.
803fb7
803fb7
http://lists.freedesktop.org/archives/systemd-devel/2015-April/030834.html
803fb7
(cherry picked from commit 084cea6cee1471d81e078bea4e7ee5f50a5dc009)
803fb7
803fb7
Cherry-picked from: 084cea6
803fb7
Resolves: #1222517
803fb7
---
803fb7
 src/resolve/resolved-dns-answer.c | 2 --
803fb7
 1 file changed, 2 deletions(-)
803fb7
803fb7
diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c
803fb7
index 7c4ab18b5..e08eb667c 100644
803fb7
--- a/src/resolve/resolved-dns-answer.c
803fb7
+++ b/src/resolve/resolved-dns-answer.c
803fb7
@@ -25,8 +25,6 @@
803fb7
 DnsAnswer *dns_answer_new(unsigned n) {
803fb7
         DnsAnswer *a;
803fb7
 
803fb7
-        assert(n > 0);
803fb7
-
803fb7
         a = malloc0(offsetof(DnsAnswer, rrs) + sizeof(DnsResourceRecord*) * n);
803fb7
         if (!a)
803fb7
                 return NULL;