xbps_sanitize_path: fix an out-of-bounds access (CID #98686).
This commit is contained in:
parent
97c8eb0c36
commit
090464e4b2
@ -437,7 +437,7 @@ xbps_sanitize_path(const char *src)
|
||||
len = strlen(src);
|
||||
assert(len != 0);
|
||||
|
||||
dest = malloc(len);
|
||||
dest = malloc(len+1);
|
||||
assert(dest);
|
||||
d = dest;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user