mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-01-23 17:33:34 +08:00
27 lines
785 B
Diff
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
|
||
|
|