mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
ITS#7027 fix bugs in prev commit
This commit is contained in:
parent
5de85b922a
commit
31995b535e
@ -323,7 +323,7 @@ int ldap_domain2hostlist(
|
||||
goto out;
|
||||
}
|
||||
hostent_head[hostent_count].priority=priority;
|
||||
hostent_head[hostent_count].weight=priority;
|
||||
hostent_head[hostent_count].weight=weight;
|
||||
hostent_head[hostent_count].port=port;
|
||||
strncpy(hostent_head[hostent_count].hostname, host,255);
|
||||
hostent_count=hostent_count+1;
|
||||
@ -336,7 +336,7 @@ add_size:;
|
||||
|
||||
for(i=0; i<hostent_count; i++){
|
||||
int buflen;
|
||||
buflen = strlen(hostent_head[i].hostname) + STRLENOF(":65355" );
|
||||
buflen = strlen(hostent_head[i].hostname) + STRLENOF(":65535 ");
|
||||
hostlist = (char *) LDAP_REALLOC(hostlist, cur+buflen+1);
|
||||
if (hostlist == NULL) {
|
||||
rc = LDAP_NO_MEMORY;
|
||||
|
Loading…
Reference in New Issue
Block a user