From: Andreas Gustafsson Date: Thu, 25 Jan 2001 20:10:02 +0000 (+0000) Subject: revert half of 711. - there was no off by one error in the v6 case, X-Git-Tag: v9.1.1rc1~29^2~29 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b586eb44084ba19b82d26ce20b7d741ac19d5331;p=thirdparty%2Fbind9.git revert half of 711. - there was no off by one error in the v6 case, only in the v4 case --- diff --git a/lib/isc/inet_ntop.c b/lib/isc/inet_ntop.c index b9138954c77..6c751e16a46 100644 --- a/lib/isc/inet_ntop.c +++ b/lib/isc/inet_ntop.c @@ -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 @@ -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); } diff --git a/lib/lwres/lwinetntop.c b/lib/lwres/lwinetntop.c index cdcb16dfadc..1fc6e9972f3 100644 --- a/lib/lwres/lwinetntop.c +++ b/lib/lwres/lwinetntop.c @@ -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 @@ -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); }