summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-16 06:08:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:22 -0500
commitfb72736e6e067b2a2b469d498c0c62c328dbf82d (patch)
tree8d9ff13af6fdf46d5f4c3b65a48da97eb7851747 /source3
parent0dd0aab2bc6a5c128f49d46ae9e126e15a54f917 (diff)
downloadsamba-fb72736e6e067b2a2b469d498c0c62c328dbf82d.tar.gz
samba-fb72736e6e067b2a2b469d498c0c62c328dbf82d.tar.bz2
samba-fb72736e6e067b2a2b469d498c0c62c328dbf82d.zip
r22240: merge from samba4:
use strlcpy instead of strcpy to make the IBM checker happy metze (This used to be commit fe4be25c3056260049a8052e072500756bf14fce)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/replace/test/testsuite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/replace/test/testsuite.c b/source3/lib/replace/test/testsuite.c
index 7d45feec6b..165d222261 100644
--- a/source3/lib/replace/test/testsuite.c
+++ b/source3/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);