From: Matthew Fernandez Date: Sat, 2 Jul 2022 15:35:46 +0000 (-0700) Subject: gvpr: fix unchecked allocation failure in 'parseArgs' X-Git-Tag: 5.0.0~5^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9885ba71ed82d416a060ab4f5845045f2e34c22;p=graphviz gvpr: fix unchecked allocation failure in 'parseArgs' --- diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c index 68032edb6..8f8de2cb7 100644 --- a/lib/gvpr/gvpr.c +++ b/lib/gvpr/gvpr.c @@ -19,6 +19,7 @@ #include "builddate.h" #include #include +#include #include #include #include @@ -166,7 +167,7 @@ static int parseArgs(char *s, int argc, char ***argv) argc = oldcnt + cnt; av = oldof(*argv, char *, argc, 0); for (i = 0; i < cnt; i++) - av[oldcnt + i] = strdup(args[i]); + av[oldcnt + i] = gv_strdup(args[i]); *argv = av; } return argc;