From 60eb8ee4bf3e0878031ec10989b9c8069972e89d Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 4 Apr 2017 15:27:27 +0000 Subject: Release 10.78.01 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2937 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/pnmtojpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'converter/other') diff --git a/converter/other/pnmtojpeg.c b/converter/other/pnmtojpeg.c index 86cb3eea..44826245 100644 --- a/converter/other/pnmtojpeg.c +++ b/converter/other/pnmtojpeg.c @@ -231,7 +231,7 @@ parseCommandLine(const int argc, char ** argv, char ** argv_parse; /* argv, except we modify it as we parse */ - MALLOCARRAY(argv_parse, argc); + MALLOCARRAY(argv_parse, argc + 1); /* +1 for the terminating null ptr */ option_def_index = 0; /* incremented by OPTENTRY */ OPTENT3(0, "verbose", OPT_FLAG, NULL, &cmdlineP->verbose, 0); @@ -274,7 +274,7 @@ parseCommandLine(const int argc, char ** argv, /* Make private copy of arguments for pm_optParseOptions to corrupt */ argc_parse = argc; - for (i=0; i < argc; i++) argv_parse[i] = argv[i]; + for (i=0; i < argc+1; i++) argv_parse[i] = argv[i]; opt.opt_table = option_def; opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ -- cgit 1.4.1