svn commit: samba r22239 - in
branches/SAMBA_4_0/source/lib/replace/test: .
metze at samba.org
metze at samba.org
Mon Apr 16 06:08:06 GMT 2007
Author: metze
Date: 2007-04-16 06:08:06 +0000 (Mon, 16 Apr 2007)
New Revision: 22239
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22239
Log:
use strlcpy instead of strcpy to make the IBM checker happy
metze
Modified:
branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2007-04-16 05:48:11 UTC (rev 22238)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2007-04-16 06:08:06 UTC (rev 22239)
@@ -117,7 +117,7 @@
{
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 @@
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);
More information about the samba-cvs
mailing list