From a9885ba71ed82d416a060ab4f5845045f2e34c22 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 2 Jul 2022 08:35:46 -0700 Subject: [PATCH] gvpr: fix unchecked allocation failure in 'parseArgs' --- lib/gvpr/gvpr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0