diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-18 19:35:40 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-18 19:35:40 +0000 |
commit | 0625b9c35ba5ee745846387db8a0857190263d5d (patch) | |
tree | 605ae7e6afc902e0ecc97f6c1710d7fa0d238c72 /other/pamstack.c | |
parent | afa13983a4b50d67a45f4793c51eae837fb0fdd4 (diff) | |
download | netpbm-mirror-0625b9c35ba5ee745846387db8a0857190263d5d.tar.gz netpbm-mirror-0625b9c35ba5ee745846387db8a0857190263d5d.tar.xz netpbm-mirror-0625b9c35ba5ee745846387db8a0857190263d5d.zip |
Release 11.03.03
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4599 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other/pamstack.c')
-rw-r--r-- | other/pamstack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/other/pamstack.c b/other/pamstack.c index 285e02c0..533795ca 100644 --- a/other/pamstack.c +++ b/other/pamstack.c @@ -242,6 +242,11 @@ processOneImageInAllStreams(unsigned int const nInput, maxvalLcm = pm_lcm(maxvalLcm + 1, inpam[inputSeq].maxval + 1, 1, PAM_OVERALL_MAXVAL + 1) - 1; + 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; } |