diff options
author | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-19 14:36:34 -0500 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-19 15:08:40 -0500 |
commit | 13bf4c4bb7a0c2fa1495bacdc81c91ee70588ce6 (patch) | |
tree | e7bd15ee9f75d6132afc9d07cb1aa2bb7c9dc225 /source3 | |
parent | 9a85533914119fb995fb61555c9f6e0018d4d181 (diff) | |
download | samba-13bf4c4bb7a0c2fa1495bacdc81c91ee70588ce6.tar.gz samba-13bf4c4bb7a0c2fa1495bacdc81c91ee70588ce6.tar.bz2 samba-13bf4c4bb7a0c2fa1495bacdc81c91ee70588ce6.zip |
Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.
(This used to be commit fd28d09a95b31bdbc6babd13c5a4ed9fc9ef4bfd)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/namequery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 12e0d01b3b..6585fd751c 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -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); |