mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.
(This used to be commit fd28d09a95b31bdbc6babd13c5a4ed9fc9ef4bfd)
This commit is contained in:
parent
9a85533914
commit
13bf4c4bb7
@ -1074,7 +1074,6 @@ static NTSTATUS resolve_hosts(const char *name, int name_type,
|
||||
&((struct sockaddr_in *)res->ai_addr)->sin_addr);
|
||||
|
||||
*return_count += 1;
|
||||
i++;
|
||||
|
||||
*return_iplist = SMB_REALLOC_ARRAY(*return_iplist,
|
||||
struct ip_service,
|
||||
@ -1086,6 +1085,8 @@ static NTSTATUS resolve_hosts(const char *name, int name_type,
|
||||
}
|
||||
(*return_iplist)[i].ip = return_ip;
|
||||
(*return_iplist)[i].port = PORT_NONE;
|
||||
|
||||
i++;
|
||||
}
|
||||
if (ailist) {
|
||||
freeaddrinfo(ailist);
|
||||
|
Loading…
x
Reference in New Issue
Block a user