Commit 03d640de authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#4610 fix.

parent 7ff829d6
......@@ -3,6 +3,7 @@ OpenLDAP 2.3 Change Log
OpenLDAP 2.3.26 Engineering
Fixed slapd incorrect rebuilding of replica URI (ITS#4633)
Fixed back-monitor operations order via callbacks (ITS#4631)
Fixed libldap dnssrv bug with "not present" positive statement (ITS#4610)
OpenLDAP 2.3.25 Release
Fixed liblber ber_bvreplace_x argument checks
......
......@@ -275,8 +275,12 @@ int ldap_domain2hostlist(
/* weight = (p[2] << 8) | p[3]; */
port = (p[4] << 8) | p[5];
buflen = strlen(host) + sizeof(":65355 ");
hostlist = (char *) LDAP_REALLOC(hostlist, cur + buflen);
if ( port == 0 || host[ 0 ] == '\0' ) {
goto add_size;
}
buflen = strlen(host) + STRLENOF(":65355 ");
hostlist = (char *) LDAP_REALLOC(hostlist, cur + buflen + 1);
if (hostlist == NULL) {
rc = LDAP_NO_MEMORY;
goto out;
......@@ -287,6 +291,7 @@ int ldap_domain2hostlist(
}
cur += sprintf(&hostlist[cur], "%s:%hd", host, port);
}
add_size:;
p += size;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment