diff options
author | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-19 14:36:34 -0500 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-19 13:08:44 -0700 |
commit | 60952803044e098682c150b7ed91d4da87f5bb79 (patch) | |
tree | e7bd15ee9f75d6132afc9d07cb1aa2bb7c9dc225 | |
parent | 9a85533914119fb995fb61555c9f6e0018d4d181 (diff) | |
download | samba-60952803044e098682c150b7ed91d4da87f5bb79.tar.gz samba-60952803044e098682c150b7ed91d4da87f5bb79.tar.bz2 samba-60952803044e098682c150b7ed91d4da87f5bb79.zip |
Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.
(This used to be commit bafcede2c29813f8719fc3b54f94612e72c48043)
-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); |