]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Thu, 25 Jan 2001 20:13:38 +0000 (20:13 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 25 Jan 2001 20:13:38 +0000 (20:13 +0000)
 711.   [bug]           The libisc and liblwres implementations of
                        inet_ntop contained an off by one error.

CHANGES
lib/isc/inet_ntop.c
lib/lwres/lwinetntop.c

diff --git a/CHANGES b/CHANGES
index 1ab4a399db307283db691e208c49a11b106451f7..1a50f0d27ecd638c00d1da92b01cba8fb41354f7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+
+ 711.  [bug]           The libisc and liblwres implementations of
+                       inet_ntop contained an off by one error.
+
  706.  [bug]           Zones with an explicit "allow-update { none; };"
                        were considered dynamic and therefore not reloaded
                        on SIGHUP or "rndc reload".
index e24e90700542e4f69cabc65799858e43ac9132c3..55cfba43556f1de8b34631e77c2e424a22131c09 100644 (file)
@@ -17,7 +17,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char rcsid[] =
-       "$Id: inet_ntop.c,v 1.9.4.1 2001/01/09 22:48:59 bwelling Exp $";
+       "$Id: inet_ntop.c,v 1.9.4.2 2001/01/25 20:13:37 gson Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <config.h>
@@ -86,7 +86,8 @@ inet_ntop4(const unsigned char *src, char *dst, size_t size)
        static const char *fmt = "%u.%u.%u.%u";
        char tmp[sizeof "255.255.255.255"];
 
-       if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) > size) {
+       if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) >= size)
+       {
                errno = ENOSPC;
                return (NULL);
        }
index ca4d6ce1dec3d3c38a3e40db0d66529416779a57..c03e0cd56021a60438f61029c819f503c3dc8bcd 100644 (file)
@@ -17,7 +17,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char rcsid[] =
-       "$Id: lwinetntop.c,v 1.5.4.1 2001/01/09 22:52:24 bwelling Exp $";
+       "$Id: lwinetntop.c,v 1.5.4.2 2001/01/25 20:13:38 gson Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <config.h>
@@ -84,7 +84,8 @@ inet_ntop4(const unsigned char *src, char *dst, size_t size) {
        static const char *fmt = "%u.%u.%u.%u";
        char tmp[sizeof "255.255.255.255"];
 
-       if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) > size) {
+       if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) >= size)
+       {
                errno = ENOSPC;
                return (NULL);
        }