summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-16 06:08:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:45 -0500
commit69370d05c94e2fceb55e19e1d886d4f7135b40a4 (patch)
treeaf688983d5cde726d09408fb8f2875cf3af8b991 /source4/lib/replace
parent0583d4d6434cbb0c622488c2878065c0c33b353a (diff)
downloadsamba-69370d05c94e2fceb55e19e1d886d4f7135b40a4.tar.gz
samba-69370d05c94e2fceb55e19e1d886d4f7135b40a4.tar.bz2
samba-69370d05c94e2fceb55e19e1d886d4f7135b40a4.zip
r22239: use strlcpy instead of strcpy to make the IBM checker happy
metze (This used to be commit d51af1b3ac8c332481f978b909ee461941f8a50d)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/test/testsuite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/replace/test/testsuite.c b/source4/lib/replace/test/testsuite.c
index 7d45feec6b..165d222261 100644
--- a/source4/lib/replace/test/testsuite.c
+++ b/source4/lib/replace/test/testsuite.c
@@ -117,7 +117,7 @@ static int test_strlcat(void)
{
char tmp[10];
printf("test: strlcat\n");
- strcpy(tmp, "");
+ strlcpy(tmp, "", sizeof(tmp));
if (strlcat(tmp, "bla", 3) != 3) {
printf("failure: strlcat [\ninvalid return code\n]\n");
return false;
@@ -128,7 +128,7 @@ static int test_strlcat(void)
return false;
}
- strcpy(tmp, "da");
+ strlcpy(tmp, "da", sizeof(tmp));
if (strlcat(tmp, "me", 4) != 4) {
printf("failure: strlcat [\nexpected \"dam\", got \"%s\"\n]\n",
tmp);