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