From b95a3b92124994efa56efa7f5d8048ca66061d96 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 27 Aug 2022 15:25:02 -0700 Subject: [PATCH] gvpr fullColor: fix unchecked allocation failure --- lib/gvpr/actions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/gvpr/actions.c b/lib/gvpr/actions.c index 6047583b0..4b1878a5e 100644 --- a/lib/gvpr/actions.c +++ b/lib/gvpr/actions.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -968,8 +969,8 @@ static char* fullColor (char* prefix, char* str) size_t len = strlen (prefix) + strlen (str) + 3; if (len >= allocated) { + fulls = gv_realloc(fulls, allocated, len + 10); allocated = len + 10; - fulls = newof(fulls, char, allocated, 0); } sprintf (fulls, "/%s/%s", prefix, str); return fulls; -- 2.40.0