valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

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

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