diff --git a/lib/util.c b/lib/util.c index df4a0963..2615ce7c 100644 --- a/lib/util.c +++ b/lib/util.c @@ -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;