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 | 61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808 (patch) | |
tree | 06d72234112a52e30d5b72e367e42efc43e9762f /source3/nmbd/nmbd_synclists.c | |
parent | ab4577f141b0c08a543d998a36892bbafae4e902 (diff) | |
download | samba-61b5fd6f32e9ccb612df1354a3e3b3bed5f2b808.tar.gz |
bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7c842bdc50205c330802d211fae54d3)
Diffstat (limited to 'source3/nmbd/nmbd_synclists.c')
-rw-r--r-- | source3/nmbd/nmbd_synclists.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c index b62d9b7569..432b6dcbe2 100644 --- a/source3/nmbd/nmbd_synclists.c +++ b/source3/nmbd/nmbd_synclists.c @@ -150,6 +150,8 @@ void sync_browse_lists(struct work_record *work, CatchChild(); if ((s->pid = fork())) return; + BlockSignals( False, SIGTERM ); + DEBUG(2,("Initiating browse sync for %s to %s(%s)\n", work->work_group, name, inet_ntoa(ip))); @@ -239,11 +241,9 @@ static void complete_sync(struct sync_record *s) ptr = line; - DEBUG(9,("sync line [%s]\n", line)); - - if (!next_token(&ptr,server,NULL) || - !next_token(&ptr,type_str,NULL) || - !next_token(&ptr,comment,NULL)) { + if (!next_token(&ptr,server,NULL,sizeof(server)) || + !next_token(&ptr,type_str,NULL, sizeof(type_str)) || + !next_token(&ptr,comment,NULL, sizeof(comment))) { continue; } |