]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2096. [bug] libbind: handle applications that fail to detect
authorMark Andrews <marka@isc.org>
Mon, 16 Oct 2006 23:00:50 +0000 (23:00 +0000)
committerMark Andrews <marka@isc.org>
Mon, 16 Oct 2006 23:00:50 +0000 (23:00 +0000)
                        res_init() failures better.

CHANGES
lib/bind/resolv/res_send.c

diff --git a/CHANGES b/CHANGES
index 8ad422bfc128d84d72137289c0e63b31cdf708fd..c80a1fd9aa644d6e10ec475a787e0fe435010546 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2096.  [bug]           libbind: handle applications that fail to detect
+                       res_init() failures better.
+
 2095.  [port]          libbind: alway prototype inet_cidr_ntop_ipv6() and
                        net_cidr_ntop_ipv6(). [RT #16388]
  
index 24527ead481ddfbec8aed8f191ca1a6e472d3e6f..c47dd49bc6e8b4264a54250220f28d02f7e267e8 100644 (file)
@@ -70,7 +70,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)res_send.c   8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.8 2006/03/08 04:13:31 marka Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -295,7 +295,8 @@ res_nsend(res_state statp,
        highestFD = sysconf(_SC_OPEN_MAX) - 1;
 #endif
 
-       if (statp->nscount == 0) {
+       /* No name servers or res_init() failure */
+       if (statp->nscount == 0 || EXT(statp).ext == NULL) {
                errno = ESRCH;
                return (-1);
        }