From 090464e4b283150daf98070ae9079060ec38ac0b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 26 Jul 2015 08:01:29 +0200 Subject: [PATCH] xbps_sanitize_path: fix an out-of-bounds access (CID #98686). --- lib/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;