[SCM] Samba Shared Repository - branch v3-0-test updated - initial-v3-0-unstable-26-g62a1c82

Jeremy Allison jra at samba.org
Mon Nov 19 20:02:41 GMT 2007


The branch, v3-0-test has been updated
       via  62a1c825b2cd702cc439c5f07fa36386b2260052 (commit)
      from  e56ee680c34f77497a436b8021b51fe296bcc322 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit 62a1c825b2cd702cc439c5f07fa36386b2260052
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Nov 19 12:02:11 2007 -0800

    Back-port fix for bug found by kukks - Samba adding
    non-initialized name to IP mapping.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/nmbd/nmbd_namelistdb.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nmbd/nmbd_namelistdb.c b/source/nmbd/nmbd_namelistdb.c
index d71eb54..cda1288 100644
--- 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,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list