[hackers] [sbase] Use strlcpy() || sin

From: <git_AT_suckless.org>
Date: Sun, 23 Mar 2014 19:33:49 +0100

commit a6ef67cd3d66504b2ae563d080140a425b702ab1
Author: sin <sin_AT_2f30.org>
Date: Sun Mar 23 18:33:06 2014 +0000

    Use strlcpy()

diff --git a/split.c b/split.c
index ae6f3a7..b63a988 100644
--- a/split.c
+++ b/split.c
_AT_@ -75,7 +75,7 @@ main(int argc, char **argv)
         plen = strlen(prefix);
         if(plen+slen > NAME_MAX)
                 eprintf("names cannot exceed %d bytes
", NAME_MAX);
- strcpy(name, prefix);
+ strlcpy(name, prefix, sizeof(name));
 
         if(file && strcmp(file, "-") != 0) {
                 in = fopen(file, "r");
Received on Sun Mar 23 2014 - 19:33:49 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 23 2014 - 19:36:19 CET