summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_browsesync.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd/nmbd_browsesync.c')
-rw-r--r--source3/nmbd/nmbd_browsesync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index f27f42297f..84c6f43f57 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);
+ safe_strcpy(userdata->data, work->work_group, size - sizeof(*userdata) - 1);
node_status( subrec, &nmbname, answer_ip,
domain_master_node_status_success,