From 6c23074f55ef954ee803262e3d452ccc6fd6af01 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 26 Mar 2024 16:24:14 +0000 Subject: Fix segfault caused by previous commit git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4887 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/pcxtoppm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converter/ppm/pcxtoppm.c b/converter/ppm/pcxtoppm.c index 32873b3a..f06dd4e8 100644 --- a/converter/ppm/pcxtoppm.c +++ b/converter/ppm/pcxtoppm.c @@ -92,14 +92,14 @@ parseCommandLine(int argc, const char ** argv, unsigned int option_def_index; + MALLOCARRAY_NOFAIL(option_def, 100); + option_def_index = 0; /* incremented by OPTENT3 */ OPTENT3(0, "stdpalette", OPT_FLAG, NULL, &cmdlineP->stdpalette, 0 ); OPTENT3(0, "verbose", OPT_FLAG, NULL, &cmdlineP->verbose, 0 ); - MALLOCARRAY_NOFAIL(option_def, 100); - opt.opt_table = option_def; opt.short_allowed = false; /* We have no short (old-fashioned) options */ opt.allowNegNum = false; /* We have no parms that are negative numbers */ -- cgit 1.4.1