]> 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:58 +0000 (23:00 +0000)
committerMark Andrews <marka@isc.org>
Mon, 16 Oct 2006 23:00:58 +0000 (23:00 +0000)
                        res_init() failures better.

CHANGES
lib/bind/resolv/res_send.c

diff --git a/CHANGES b/CHANGES
index d50c9764ea04677b11424a427a3a104d0ce9a485..9a7eb416b92065510399a79e407829c972e271f5 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 8b25401fbae361c9f48b9e8866e69145af2d866c..39dc998da7972e663ee74db9e5cb78b133fae7c9 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.9.18.7 2006/03/08 04:14:17 marka Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.9.18.8 2006/10/16 23:00:58 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /*! \file
@@ -300,7 +300,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);
        }