From d13285fdd81eeec010dd273090d45e55f4b400fe Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 8 Jul 2002 18:45:53 +0000 Subject: [PATCH] Fix possible under allocation of buffer --- libraries/libldap/dnssrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5