summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/util/string_wrappers.h8
-rw-r--r--source3/nmbd/nmbd_become_lmb.c2
-rw-r--r--source3/nmbd/nmbd_browsesync.c2
3 files changed, 2 insertions, 10 deletions
diff --git a/lib/util/string_wrappers.h b/lib/util/string_wrappers.h
index 79119348c5..4a5f51d96b 100644
--- a/lib/util/string_wrappers.h
+++ b/lib/util/string_wrappers.h
@@ -56,14 +56,6 @@ size_t __unsafe_string_function_usage_here_size_t__(void);
* update a lot of code. To make this a little easier here are some
* functions that provide the lengths with less pain */
-/* overmalloc_safe_strcpy: DEPRECATED! Used when you know the
- * destination buffer is longer than maxlength, but you don't know how
- * long. This is not a good situation, because we can't do the normal
- * sanity checks. Don't use in new code! */
-
-#define overmalloc_safe_strcpy(dest,src,maxlength) \
- safe_strcpy_fn(dest,src,maxlength)
-
#ifdef HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS
/* if the compiler will optimize out function calls, then use this to tell if we are
diff --git a/source3/nmbd/nmbd_become_lmb.c b/source3/nmbd/nmbd_become_lmb.c
index ffd92cf0d8..58dd3eec9e 100644
--- a/source3/nmbd/nmbd_become_lmb.c
+++ b/source3/nmbd/nmbd_become_lmb.c
@@ -554,7 +554,7 @@ in workgroup %s on subnet %s\n",
userdata->copy_fn = NULL;
userdata->free_fn = NULL;
userdata->userdata_len = strlen(work->work_group)+1;
- overmalloc_safe_strcpy(userdata->data, work->work_group, size - sizeof(*userdata) - 1);
+ strlcpy(userdata->data, work->work_group, size - sizeof(*userdata));
/* Register the special browser group name. */
register_name(subrec, MSBROWSE, 0x01, samba_nb_type|NB_GROUP,
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index 3dc89b5026..4a6f9f2d47 100644
--- a/source3/nmbd/nmbd_browsesync.c
+++ b/source3/nmbd/nmbd_browsesync.c
@@ -330,7 +330,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;
- overmalloc_safe_strcpy(userdata->data, work->work_group, size - sizeof(*userdata) - 1);
+ strlcpy(userdata->data, work->work_group, size - sizeof(*userdata));
node_status( subrec, &nmbname, answer_ip,
domain_master_node_status_success,