From: Stefan Metzmacher Date: Mon, 16 Apr 2007 06:08:43 +0000 (+0000) Subject: r22240: merge from samba4: X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~709 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe4be25c3056260049a8052e072500756bf14fce;p=thirdparty%2Fsamba.git r22240: merge from samba4: use strlcpy instead of strcpy to make the IBM checker happy metze --- diff --git a/source/lib/replace/test/testsuite.c b/source/lib/replace/test/testsuite.c index 7d45feec6b4..165d222261e 100644 --- a/source/lib/replace/test/testsuite.c +++ b/source/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);