From fb72736e6e067b2a2b469d498c0c62c328dbf82d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 16 Apr 2007 06:08:43 +0000 Subject: r22240: merge from samba4: use strlcpy instead of strcpy to make the IBM checker happy metze (This used to be commit fe4be25c3056260049a8052e072500756bf14fce) --- source3/lib/replace/test/testsuite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') 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); -- cgit