mirror of
https://github.com/samba-team/samba.git
synced 2025-02-21 01:59:07 +03:00
Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.
(This used to be commit bafcede2c29813f8719fc3b54f94612e72c48043)
This commit is contained in:
parent
9a85533914
commit
6095280304
@ -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