- (djm) Another off-by-one fix from Pavel Kankovsky
<peak@argo.troja.mff.cuni.cz>
This commit is contained in:
parent
15e7d4b64c
commit
e9edd7c3b5
1
CREDITS
1
CREDITS
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue