]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Fri, 2 Nov 2001 01:32:53 +0000 (01:32 +0000)
committerAndreas Gustafsson <source@isc.org>
Fri, 2 Nov 2001 01:32:53 +0000 (01:32 +0000)
1101.   [bug]           Array bounds read error in lwres_gai_strerror.

CHANGES
lib/lwres/gai_strerror.c

diff --git a/CHANGES b/CHANGES
index f17d55cca773677fbe2d693815458ed25f21f19a..e1feb8fac108aae914cd345b500b5b1d331cd61e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 
        --- 9.2.0rc9 released ---
 
+1101.  [bug]           Array bounds read error in lwres_gai_strerror.
+
 1084.  [cleanup]       libbind: gai_strerror() rewritten.
 
 1083.  [bug]           The default control channel listened on the
index fde532254ada3eed530c9896d907e8554538d63d..43345dc0a0124335c570d252b660de0bb426dc77 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: gai_strerror.c,v 1.14 2001/05/29 22:40:10 bwelling Exp $ */
+/* $Id: gai_strerror.c,v 1.14.2.1 2001/11/02 01:32:53 gson Exp $ */
 
 #include <lwres/netdb.h>
 
@@ -43,7 +43,8 @@ lwres_gai_strerror(int ecode) {
                char *deconst_ptr;
        } ptr;
 
-       if ((ecode < 0) || (ecode > EAI_MAX))
+       if ((ecode < 0) ||
+           (ecode >= (int)(sizeof(gai_messages)/sizeof(*gai_messages))))
                ptr.const_ptr = "invalid error code";
        else
                ptr.const_ptr = gai_messages[ecode];