summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-31 03:11:42 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-31 03:11:42 +0000
commit61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808 (patch)
tree06d72234112a52e30d5b72e367e42efc43e9762f /source3/nmbd/nmbd.c
parentab4577f141b0c08a543d998a36892bbafae4e902 (diff)
downloadsamba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.tar.gz
samba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.tar.bz2
samba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.zip
bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r--source3/nmbd/nmbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 9210ce4dcf..feb9c2420e 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -468,7 +468,7 @@ static BOOL init_structs(void)
*/
/* Work out the max number of netbios aliases that we have */
ptr = lp_netbios_aliases();
- for( namecount=0; next_token(&ptr,nbname,NULL); namecount++ )
+ for( namecount=0; next_token(&ptr,nbname,NULL, sizeof(nbname)); namecount++ )
;
if ( *global_myname )
namecount++;
@@ -487,7 +487,7 @@ static BOOL init_structs(void)
my_netbios_names[namecount++] = global_myname;
ptr = lp_netbios_aliases();
- while ( next_token( &ptr, nbname, NULL ) )
+ while ( next_token( &ptr, nbname, NULL, sizeof(nbname) ) )
{
strupper( nbname );
/* Look for duplicates */