xbps_sanitize_path: fix an out-of-bounds access (CID #98686).

This commit is contained in:
Juan RP 2015-07-26 08:01:29 +02:00
parent 97c8eb0c36
commit 090464e4b2

View File

@ -437,7 +437,7 @@ xbps_sanitize_path(const char *src)
len = strlen(src); len = strlen(src);
assert(len != 0); assert(len != 0);
dest = malloc(len); dest = malloc(len+1);
assert(dest); assert(dest);
d = dest; d = dest;