sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit a6ef67cd3d66504b2ae563d080140a425b702ab1
parent dd7eb6386917b64f331c94fab662829da56fab10
Author: sin <sin@2f30.org>
Date:   Sun Mar 23 18:33:06 +0000

Use strlcpy()

Diffstat:
split.c | 2+-
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");