From: Kurt Zeilenga Date: Mon, 8 Jul 2002 18:45:53 +0000 (+0000) Subject: Fix possible under allocation of buffer X-Git-Tag: NO_SLAP_OP_BLOCKS~1383 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d13285fdd81eeec010dd273090d45e55f4b400fe;p=openldap Fix possible under allocation of buffer --- diff --git a/libraries/libldap/dnssrv.c b/libraries/libldap/dnssrv.c index cc193e9358..0f7c863b2b 100644 --- a/libraries/libldap/dnssrv.c +++ b/libraries/libldap/dnssrv.c @@ -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;