summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-03 15:33:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-03 07:37:07 +0200
commitd01f318179f9c2a0e6730642d21465b6dd69ea9f (patch)
treec72c39a22f609382417aecc80660b76cf8ac56ec /source4/torture
parentb96389d3e17013fd22a64b6ce54478bd912d06b3 (diff)
downloadsamba-d01f318179f9c2a0e6730642d21465b6dd69ea9f.tar.gz
samba-d01f318179f9c2a0e6730642d21465b6dd69ea9f.tar.bz2
samba-d01f318179f9c2a0e6730642d21465b6dd69ea9f.zip
s4: fix arguments to safe_strcpy()
Found by the s3-derivied safe_strcpy() macro. Andrew Bartlett
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/masktest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c
index 42665ab897..bfd1aff5e8 100644
--- a/source4/torture/masktest.c
+++ b/source4/torture/masktest.c
@@ -175,7 +175,7 @@ static void testpair(TALLOC_CTX *mem_ctx, struct smbcli_state *cli, char *mask,
count++;
- safe_strcpy(res1, "---", sizeof(res1));
+ safe_strcpy(res1, "---", sizeof(res1)-1);
state.mem_ctx = mem_ctx;
@@ -189,7 +189,7 @@ static void testpair(TALLOC_CTX *mem_ctx, struct smbcli_state *cli, char *mask,
resultp = res1;
short_name = talloc_strdup(mem_ctx, "");
get_real_name(mem_ctx, cli, &long_name, &short_name);
- safe_strcpy(res1, "---", sizeof(res1));
+ safe_strcpy(res1, "---", sizeof(res1)-1);
smbcli_list_new(cli->tree, mask,
FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_DIRECTORY,
RAW_SEARCH_DATA_BOTH_DIRECTORY_INFO,