git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a85533
)
Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.
author
Gerald (Jerry) Carter
<jerry@samba.org>
Fri, 19 Oct 2007 19:36:34 +0000
(14:36 -0500)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Fri, 19 Oct 2007 20:08:40 +0000
(15:08 -0500)
(This used to be commit
fd28d09a95b31bdbc6babd13c5a4ed9fc9ef4bfd
)
source3/libsmb/namequery.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/namequery.c
b/source3/libsmb/namequery.c
index 12e0d01b3b3713bde0d60f7ab21fd8b8fd48d18d..6585fd751c096d563fe206902c3e3f7ca268f18e 100644
(file)
--- 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);