mirror of
git://git.suckless.org/sbase
synced 2024-12-23 15:34:38 +00:00
Use strlcpy()
This commit is contained in:
parent
dd7eb63869
commit
a6ef67cd3d
2
split.c
2
split.c
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user