examples: Remove all uses of strcpy in examples (except for validchr.c).
[nivanova/samba-autobuild/.git] / examples / libsmbclient / testtruncate.c
index 3e29ad225c718e324da46d93b2333f31f35ea84f..1b4298db26ceae68f311d666a513c65df8c55af9 100644 (file)
@@ -32,7 +32,7 @@ int main(int argc, char * argv[])
         return 1;
     }
 
-    strcpy(buffer, "Hello world.\nThis is a test.\n");
+    snprintf(buffer, sizeof(buffer), "%s", "Hello world.\nThis is a test.\n");
 
     ret = smbc_write(fd, buffer, strlen(buffer));
     savedErrno = errno;