From: Matthew Fernandez Date: Sat, 27 Aug 2022 22:25:02 +0000 (-0700) Subject: gvpr fullColor: fix unchecked allocation failure X-Git-Tag: 6.0.1~18^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b95a3b92124994efa56efa7f5d8048ca66061d96;p=graphviz gvpr fullColor: fix unchecked allocation failure --- 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;