lib32/lib32-glibc/glibc-2.14-avoid-assertion-on-empty-dns-answer.patch
2011-10-16 13:25:31 +00:00

27 lines
785 B
Diff

From 032c0ee3ee28841d684950e33a77210118697566 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Sep 2011 10:46:14 +0200
Subject: [PATCH] Avoid assertion failure when first DNS answer was empty
---
ChangeLog | 4 ++++
resolv/res_query.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 2f7cfaa..2ded9fb 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -248,7 +248,7 @@ __libc_res_nquery(res_state statp,
&& *resplen2 > (int) sizeof (HEADER))
{
/* Special case of partial answer. */
- assert (hp != hp2);
+ assert (n == 0 || hp != hp2);
hp = hp2;
}
else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
--
1.7.3.4