Fix possible under allocation of buffer

This commit is contained in:
Kurt Zeilenga 2002-07-08 18:45:53 +00:00
parent deb62446fe
commit d13285fdd8

View file

@ -261,7 +261,7 @@ int ldap_domain2hostlist(
/* weight = (p[2] << 8) | p[3]; */
port = (p[4] << 8) | p[5];
buflen = strlen(host) + sizeof(":65355");
buflen = strlen(host) + sizeof(":65355 ");
hostlist = (char *) LDAP_REALLOC(hostlist, cur + buflen);
if (hostlist == NULL) {
rc = LDAP_NO_MEMORY;