examples: Remove all uses of strcpy in examples (except for validchr.c).
[nivanova/samba-autobuild/.git] / examples / libsmbclient / testacl.c
index 99a6d136e2c845aec18c838efb9cc00f842261fe..055e38cc70f410b40feba90016fb3ef4013cee8e 100644 (file)
@@ -139,7 +139,8 @@ int main(int argc, const char *argv[])
         return 1;
     }
     
-    strcpy(path, poptGetArg(pc));
+    strncpy(path, poptGetArg(pc), sizeof(path));
+    path[sizeof(path)-1] = '\0';
     
     if (smbc_init(get_auth_data_fn, debug) != 0)
     {