]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
create directory: fix strlcpy usage
authorJason Ish <ish@unx.ca>
Thu, 4 Jan 2018 17:04:52 +0000 (11:04 -0600)
committerJason Ish <ish@unx.ca>
Thu, 18 Jan 2018 11:57:26 +0000 (05:57 -0600)
The final character was being cut off.

src/util-path.c

index 5af172fb619894a7b162fa7bf1ed55ac8496898e..87efc11774adbd7a8bdde02dcef586ecb9c6d040 100644 (file)
@@ -81,7 +81,7 @@ int SCCreateDirectoryTree(const char *path)
         return -1;
     }
 
-    strlcpy(pathbuf, path, len);
+    strlcpy(pathbuf, path, sizeof(pathbuf));
 
     for (p = pathbuf + 1; *p; p++) {
         if (*p == '/') {