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
/* 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;
}
cur += sprintf(&hostlist[cur], "%s:%hd", host, port);
}
+add_size:;
p += size;
}
}