1
0
mirror of git://git.suckless.org/sbase synced 2024-12-23 23:43:33 +00:00

Use strlcpy()

This commit is contained in:
sin 2014-03-23 18:33:06 +00:00
parent dd7eb63869
commit a6ef67cd3d

View File

@ -75,7 +75,7 @@ main(int argc, char **argv)
plen = strlen(prefix); plen = strlen(prefix);
if(plen+slen > NAME_MAX) if(plen+slen > NAME_MAX)
eprintf("names cannot exceed %d bytes\n", NAME_MAX); eprintf("names cannot exceed %d bytes\n", NAME_MAX);
strcpy(name, prefix); strlcpy(name, prefix, sizeof(name));
if(file && strcmp(file, "-") != 0) { if(file && strcmp(file, "-") != 0) {
in = fopen(file, "r"); in = fopen(file, "r");