about summary refs log tree commit diff
path: root/generator
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-04-22 00:53:01 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-04-22 00:53:01 +0000
commit72ceab7e118dc500d66b3029365f05d282f0f400 (patch)
tree484c5fe05e2afce531346b736c60ca4c8bcd0633 /generator
parent37ac1dc7ee301a66d78a4a59216f75369690ca0a (diff)
downloadnetpbm-mirror-72ceab7e118dc500d66b3029365f05d282f0f400.tar.gz
netpbm-mirror-72ceab7e118dc500d66b3029365f05d282f0f400.tar.xz
netpbm-mirror-72ceab7e118dc500d66b3029365f05d282f0f400.zip
Fix wild pointer when very small memory allocation fails
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3791 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r--generator/ppmmake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/ppmmake.c b/generator/ppmmake.c
index 2d4bbca8..7bac9601 100644
--- a/generator/ppmmake.c
+++ b/generator/ppmmake.c
@@ -46,7 +46,7 @@ parseCommandLine(int argc, char ** argv,
     unsigned int maxvalSpec;
     unsigned int option_def_index;
 
-    MALLOCARRAY(option_def, 100);
+    MALLOCARRAY_NOFAIL(option_def, 100);
 
     option_def_index = 0;   /* incremented by OPTENTRY */
     OPTENT3(0,   "maxval",    OPT_UINT, &cmdlineP->maxval, &maxvalSpec,    0);