about summary refs log tree commit diff
path: root/other/pamstack.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-08-05 23:15:49 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-08-05 23:15:49 +0000
commitc2681d9fc508c78b474eb6b3642f693b2a4bc9a8 (patch)
tree1ca75a4d92ba5cd0a31e25c746e559131908c12b /other/pamstack.c
parent23ce26f64c34e30951ad9ade2151552ed77e7357 (diff)
downloadnetpbm-mirror-c2681d9fc508c78b474eb6b3642f693b2a4bc9a8.tar.gz
netpbm-mirror-c2681d9fc508c78b474eb6b3642f693b2a4bc9a8.tar.xz
netpbm-mirror-c2681d9fc508c78b474eb6b3642f693b2a4bc9a8.zip
Release 11.02.01
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4576 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other/pamstack.c')
-rw-r--r--other/pamstack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/other/pamstack.c b/other/pamstack.c
index 308852c8..9e56845f 100644
--- a/other/pamstack.c
+++ b/other/pamstack.c
@@ -186,6 +186,11 @@ processOneImageInAllStreams(unsigned int const nInput,
                 pm_error("Image no. %u does not have the same maxval as "
                          "Image 0.", inputSeq);
         }
+        if (inpam[inputSeq].depth > UINT_MAX - outputDepth)
+            pm_error("Total number of planes is too large to compute "
+                     "(at least %u plus %u)",
+                     outputDepth, inpam[inputSeq].depth);
+
         outputDepth += inpam[inputSeq].depth;
     }