From: Jason Ish Date: Thu, 4 Jan 2018 17:04:52 +0000 (-0600) Subject: create directory: fix strlcpy usage X-Git-Tag: suricata-4.1.0-beta1~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d558ddc27a4f74b8754b7bd0df7bc9f67c8b94c;p=thirdparty%2Fsuricata.git create directory: fix strlcpy usage The final character was being cut off. --- diff --git a/src/util-path.c b/src/util-path.c index 5af172fb61..87efc11774 100644 --- a/src/util-path.c +++ b/src/util-path.c @@ -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 == '/') {