538. [bug] fix buffer overruns by 1 in lwres_getnameinfo().

This commit is contained in:
Mark Andrews
2000-11-02 01:10:22 +00:00
parent e3e3bafa13
commit c03298d879
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
538. [bug] fix buffer overruns by 1 in lwres_getnameinfo().
537. [func] Use transfer-source{-v6} when notify messages.
536. [func] Use transfer-source{-v6} when sending refresh queries.
+2 -2
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getnameinfo.c,v 1.26 2000/10/05 22:27:52 bwelling Exp $ */
/* $Id: getnameinfo.c,v 1.27 2000/11/02 01:10:22 marka Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -238,7 +238,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
}
}
#endif
if (strlen(numaddr) > hostlen)
if (strlen(numaddr) + 1 > hostlen)
ERR(ENI_MEMORY);
strcpy(host, numaddr);
} else {