revert half of 711. - there was no off by one error in the v6 case,
only in the v4 case
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user