summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-06 07:55:48 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-06 07:55:48 +0000
commit192148bab352697e625e78e7f2444e00453f35ff (patch)
treedfe53aeadc911f961ee146cb5af7ba6d1f370246 /source3/client/client.c
parent7a3cc345e0508848b0e2bd492789973bcf2d5841 (diff)
downloadsamba-192148bab352697e625e78e7f2444e00453f35ff.tar.gz
samba-192148bab352697e625e78e7f2444e00453f35ff.tar.bz2
samba-192148bab352697e625e78e7f2444e00453f35ff.zip
More safe_strcpy() off-by-one bug fixes. (mostly moves to pstrcpy()/fstrcpy())
Andrew Bartlett (This used to be commit 42b5514404bc7e33306c11344c6c934a1f83d295)
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 5da12fd984..065cd2fcc9 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2346,7 +2346,7 @@ static struct cli_state *do_connect(const char *server, const char *share)
char *sharename;
/* make a copy so we don't modify the global string 'service' */
- safe_strcpy(servicename, share, sizeof(servicename)-1);
+ fstrcpy(servicename, share);
sharename = servicename;
if (*sharename == '\\') {
server = sharename+2;
@@ -2621,9 +2621,9 @@ static int do_message_op(void)
make_nmb_name(&calling, global_myname(), 0x0);
make_nmb_name(&called , desthost, name_type);
- safe_strcpy(server_name, desthost, sizeof(server_name));
+ fstrcpy(server_name, desthost);
snprintf(name_type_hex, sizeof(name_type_hex), "#%X", name_type);
- safe_strcat(server_name, name_type_hex, sizeof(server_name));
+ fstrcat(server_name, name_type_hex);
zero_ip(&ip);
if (have_ip) ip = dest_ip;