diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-03-18 11:56:56 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-03-18 11:56:56 +0000 |
commit | 50e9b88dff56e70ad03eb104cb151fe21112b984 (patch) | |
tree | 3b6be4ae249057027b3b7209c977eae0a09dd056 /source3/nmbd/nmbd_browsesync.c | |
parent | 972e492bed431d7a19f9b54727952293ce395660 (diff) | |
download | samba-50e9b88dff56e70ad03eb104cb151fe21112b984.tar.gz |
NMBD string parinoia and memcpy() parinoia fixes from HEAD.
Andrew Bartlett
(This used to be commit fb29caddd987f94989f852584b912eeee45b50da)
Diffstat (limited to 'source3/nmbd/nmbd_browsesync.c')
-rw-r--r-- | source3/nmbd/nmbd_browsesync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c index c363ed0d343..b9082ee1c37 100644 --- a/source3/nmbd/nmbd_browsesync.c +++ b/source3/nmbd/nmbd_browsesync.c @@ -288,7 +288,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec, struct work_record *work; struct nmb_name nmbname; struct userdata_struct *userdata; - int size = sizeof(struct userdata_struct) + sizeof(fstring)+1; + size_t size = sizeof(struct userdata_struct) + sizeof(fstring)+1; if( !(work = find_workgroup_on_subnet(subrec, q_name->name)) ) { @@ -333,7 +333,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec, userdata->copy_fn = NULL; userdata->free_fn = NULL; userdata->userdata_len = strlen(work->work_group)+1; - fstrcpy(userdata->data, work->work_group); + overmalloc_safe_strcpy(userdata->data, work->work_group, size - sizeof(*userdata) - 1); node_status( subrec, &nmbname, answer_ip, domain_master_node_status_success, |