diff options
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | fake-getnameinfo.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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 diff --git a/fake-getnameinfo.c b/fake-getnameinfo.c index ce992d111..203621f0d 100644 --- a/fake-getnameinfo.c +++ b/fake-getnameinfo.c @@ -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); |