From 37ac1dc7ee301a66d78a4a59216f75369690ca0a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 22 Apr 2020 00:52:53 +0000 Subject: Fix wild pointer when very small memory allocation fails git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3790 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- generator/pbmtextps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generator') diff --git a/generator/pbmtextps.c b/generator/pbmtextps.c index f543618d..0c3656e7 100644 --- a/generator/pbmtextps.c +++ b/generator/pbmtextps.c @@ -190,7 +190,7 @@ parseCommandLine(int argc, const char ** argv, unsigned int leftmarginSpec, rightmarginSpec; unsigned int topmarginSpec, bottommarginSpec; - MALLOCARRAY(option_def, 100); + MALLOCARRAY_NOFAIL(option_def, 100); option_def_index = 0; /* incremented by OPTENTRY */ OPTENT3(0, "resolution", OPT_UINT, -- cgit 1.4.1