]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
revert half of 711. - there was no off by one error in the v6 case,
authorAndreas Gustafsson <source@isc.org>
Thu, 25 Jan 2001 20:10:02 +0000 (20:10 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 25 Jan 2001 20:10:02 +0000 (20:10 +0000)
only in the v4 case

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

index b9138954c77ea4b56fb4c017577ac772c4f728c6..6c751e16a46b59de10d0558f78e72f23ff5ea6d6 100644 (file)
@@ -17,7 +17,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char rcsid[] =
-       "$Id: inet_ntop.c,v 1.11 2001/01/25 19:39:48 bwelling Exp $";
+       "$Id: inet_ntop.c,v 1.12 2001/01/25 20:10:01 gson Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <config.h>
@@ -184,7 +184,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
        /*
         * Check for overflow, copy, and we're done.
         */
-       if ((size_t)(tp - tmp) >= size) {
+       if ((size_t)(tp - tmp) > size) {
                errno = ENOSPC;
                return (NULL);
        }
index cdcb16dfadcd62c58e369d3d076362b650ddc722..1fc6e9972f36ec85a6f6c89c190d9b28ce5f50d0 100644 (file)
@@ -17,7 +17,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static char rcsid[] =
-       "$Id: lwinetntop.c,v 1.7 2001/01/25 19:39:47 bwelling Exp $";
+       "$Id: lwinetntop.c,v 1.8 2001/01/25 20:10:02 gson Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <config.h>
@@ -181,7 +181,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size) {
        /*
         * Check for overflow, copy, and we're done.
         */
-       if ((size_t)(tp - tmp) >= size) {
+       if ((size_t)(tp - tmp) > size) {
                errno = ENOSPC;
                return (NULL);
        }