Blame SOURCES/0208-resolved-allow-DnsAnswer-objects-with-no-space-for-R.patch

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