commit a6ef67cd3d66504b2ae563d080140a425b702ab1
parent dd7eb6386917b64f331c94fab662829da56fab10
Author: sin <sin@2f30.org>
Date: Sun, 23 Mar 2014 18:33:06 +0000
Use strlcpy()
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/split.c b/split.c
@@ -75,7 +75,7 @@ main(int argc, char **argv)
plen = strlen(prefix);
if(plen+slen > NAME_MAX)
eprintf("names cannot exceed %d bytes\n", NAME_MAX);
- strcpy(name, prefix);
+ strlcpy(name, prefix, sizeof(name));
if(file && strcmp(file, "-") != 0) {
in = fopen(file, "r");