diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-31 03:11:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-31 03:11:42 +0000 |
commit | 3eade55dc7c842bdc50205c330802d211fae54d3 (patch) | |
tree | 09bca34d4463927d2930e9e926165d378ecb870f /source/nmbd/nmbd.c | |
parent | 7d455ee637b6ff70c95845f89d71573ca07b83f3 (diff) | |
download | samba-3eade55dc7c842bdc50205c330802d211fae54d3.tar.gz samba-3eade55dc7c842bdc50205c330802d211fae54d3.tar.xz samba-3eade55dc7c842bdc50205c330802d211fae54d3.zip |
bounds check next_token() to prevent possible buffer overflows
Diffstat (limited to 'source/nmbd/nmbd.c')
-rw-r--r-- | source/nmbd/nmbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 9210ce4dcf8..feb9c2420e3 100644 --- a/source/nmbd/nmbd.c +++ b/source/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 */ |