diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-05 22:48:32 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-05 22:48:32 +0000 |
commit | 24123421ac90801b89e9a11df77e3b27440b0e60 (patch) | |
tree | e7cdee4becd2f5eeda0aa106948604a674263911 /other | |
parent | d5e474be483b3ce7eed36d63c7644139b529201c (diff) | |
download | netpbm-mirror-24123421ac90801b89e9a11df77e3b27440b0e60.tar.gz netpbm-mirror-24123421ac90801b89e9a11df77e3b27440b0e60.tar.xz netpbm-mirror-24123421ac90801b89e9a11df77e3b27440b0e60.zip |
Fix previous commit
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4573 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'other')
-rw-r--r-- | other/pamstack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/other/pamstack.c b/other/pamstack.c index 3f974a3a..285e02c0 100644 --- a/other/pamstack.c +++ b/other/pamstack.c @@ -13,6 +13,7 @@ -----------------------------------------------------------------------------*/ #include <string.h> +#include <assert.h> #include "pm_c_util.h" #include "mallocvar.h" @@ -236,8 +237,10 @@ processOneImageInAllStreams(unsigned int const nInput, if (inpam[inputSeq].maxval != inpam[0].maxval) allImagesSameMaxval = false; + assert(PAM_OVERALL_MAXVAL <= UINT_MAX-1); + maxvalLcm = pm_lcm(maxvalLcm + 1, inpam[inputSeq].maxval + 1, 1, - PAM_OVERALL_MAXVAL) - 1; + PAM_OVERALL_MAXVAL + 1) - 1; outputDepth += inpam[inputSeq].depth; } |