- (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
|
Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch
|
||||||
Nate Itkin <nitkin@europa.com> - SunOS 4.1.x fixes
|
Nate Itkin <nitkin@europa.com> - SunOS 4.1.x fixes
|
||||||
Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches
|
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
|
Pavel Troller <patrol@omni.sinus.cz> - Bugfixes
|
||||||
Pekka Savola <pekkas@netcore.fi> - Bugfixes
|
Pekka Savola <pekkas@netcore.fi> - Bugfixes
|
||||||
Peter Kocks <peter.kocks@baygate.com> - Makefile fixes
|
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) {
|
if (serv) {
|
||||||
snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
|
snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
|
||||||
if (strlen(tmpserv) > servlen)
|
if (strlen(tmpserv) >= servlen)
|
||||||
return EAI_MEMORY;
|
return EAI_MEMORY;
|
||||||
else
|
else
|
||||||
strcpy(serv, tmpserv);
|
strcpy(serv, tmpserv);
|
||||||
|
|
Loading…
Reference in New Issue