Use strlcpy()

This commit is contained in:
sin 2014-03-23 18:33:06 +00:00
parent dd7eb63869
commit a6ef67cd3d
1 changed files with 1 additions and 1 deletions

View File

@ -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");