From 16360cc0cebdfb04145d71bb553aedb73c571009 Mon Sep 17 00:00:00 2001
From: Kurt Zeilenga <kurt@openldap.org>
Date: Wed, 10 Jul 2002 03:24:20 +0000
Subject: [PATCH] Fix possible under allocaion bug

---
 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;
-- 
GitLab