about summary refs log tree commit diff
path: root/editor/pamflip
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-06-27 20:01:16 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-06-27 20:01:16 +0000
commit891335df64ef7ccf039d5d4d55dc981c8520b6ec (patch)
treecb692bab2a2bde2c7c17248b34619b8490daf7ca /editor/pamflip
parentca664e29a76cba35cb7ffc505db151ec27d21a98 (diff)
downloadnetpbm-mirror-891335df64ef7ccf039d5d4d55dc981c8520b6ec.tar.gz
netpbm-mirror-891335df64ef7ccf039d5d4d55dc981c8520b6ec.tar.xz
netpbm-mirror-891335df64ef7ccf039d5d4d55dc981c8520b6ec.zip
Use MALLOCARRAY2 instead of pm_allocarray
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1252 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pamflip')
-rw-r--r--editor/pamflip/pamflip_sse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/pamflip/pamflip_sse.c b/editor/pamflip/pamflip_sse.c
index f953ab68..6e1b2230 100644
--- a/editor/pamflip/pamflip_sse.c
+++ b/editor/pamflip/pamflip_sse.c
@@ -19,6 +19,7 @@
 
 #include "pm_config.h"
 #include "pm_c_util.h"
+#include "mallocvar.h"
 #include "pam.h"
 
 #include "flip.h"
@@ -364,8 +365,10 @@ pamflip_transformRowsToColumnsPbmSse(const struct pam * const inpamP,
     unsigned int outcol16;
 
     inrow = pbm_allocarray_packed( inpamP->width, 16);
-    outplane =
-      (uint16_t **) pm_allocarray( blocksPerRow, outpamP->height + 7, 2);
+    MALLOCARRAY2(outplane, outpamP->height + 7, blocksPerRow);
+    if (outplane == NULL)
+        pm_error("Could not allocate %u x %u array of 16 bit units",
+                 blocksPerRow, outpamP->height + 7);
 
     /* We write to the output array in 16 bit units.  Add margin. */