- (djm) Another off-by-one fix from Pavel Kankovsky

<peak@argo.troja.mff.cuni.cz>
This commit is contained in:
Damien Miller 2000-09-29 10:59:14 +11:00
parent 15e7d4b64c
commit e9edd7c3b5
2 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@ Michael Stone <mstone@cs.loyola.edu> - Irix enhancements
Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
Nate Itkin <nitkin@europa.com> - SunOS 4.1.x fixes
Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches
Pavel Kankovsky <peak@argo.troja.mff.cuni.cz> - Security fixes
Pavel Troller <patrol@omni.sinus.cz> - Bugfixes
Pekka Savola <pekkas@netcore.fi> - Bugfixes
Peter Kocks <peter.kocks@baygate.com> - Makefile fixes

View File

@ -22,7 +22,7 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
if (serv) {
snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
if (strlen(tmpserv) > servlen)
if (strlen(tmpserv) >= servlen)
return EAI_MEMORY;
else
strcpy(serv, tmpserv);