diff --git a/CREDITS b/CREDITS index 0bae5a1a5..78ce2d697 100644 --- a/CREDITS +++ b/CREDITS @@ -57,6 +57,7 @@ Michael Stone - Irix enhancements Nalin Dahyabhai - PAM environment patch Nate Itkin - SunOS 4.1.x fixes Niels Kristian Bech Jensen - Assorted patches +Pavel Kankovsky - Security fixes Pavel Troller - Bugfixes Pekka Savola - Bugfixes Peter Kocks - 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);