git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e56ee68
)
Back-port fix for bug found by kukks - Samba adding
author
Jeremy Allison
<jra@samba.org>
Mon, 19 Nov 2007 20:02:11 +0000
(12:02 -0800)
committer
Jeremy Allison
<jra@samba.org>
Mon, 19 Nov 2007 20:02:11 +0000
(12:02 -0800)
non-initialized name to IP mapping.
Jeremy.
source/nmbd/nmbd_namelistdb.c
patch
|
blob
|
history
diff --git
a/source/nmbd/nmbd_namelistdb.c
b/source/nmbd/nmbd_namelistdb.c
index d71eb5479a293b98889eb095a46ec640692dfe47..cda12885ef4e4d33660206a4eb1217251552bc6e 100644
(file)
--- a/
source/nmbd/nmbd_namelistdb.c
+++ b/
source/nmbd/nmbd_namelistdb.c
@@
-505,8
+505,12
@@
void add_samba_names_to_subnet( struct subnet_record *subrec )
return;
}
- for( bcast_subrecs = FIRST_SUBNET, i = 0; bcast_subrecs; bcast_subrecs = NEXT_SUBNET_EXCLUDING_UNICAST(bcast_subrecs), i++ )
+ for( bcast_subrecs = FIRST_SUBNET, i = 0; bcast_subrecs &&
+ i < num_ips;
+ bcast_subrecs = NEXT_SUBNET_EXCLUDING_UNICAST(bcast_subrecs), i++ ) {
iplist[i] = bcast_subrecs->myip;
+ }
+ num_ips = i;
}
add_name_to_subnet(subrec,"*",0x0,samba_nb_type, PERMANENT_TTL,