git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
examples: Remove all uses of strcpy in examples (except for validchr.c).
[nivanova/samba-autobuild/.git]
/
examples
/
libsmbclient
/
testacl.c
diff --git
a/examples/libsmbclient/testacl.c
b/examples/libsmbclient/testacl.c
index 99a6d136e2c845aec18c838efb9cc00f842261fe..055e38cc70f410b40feba90016fb3ef4013cee8e 100644
(file)
--- a/
examples/libsmbclient/testacl.c
+++ b/
examples/libsmbclient/testacl.c
@@
-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)
{