about summary refs log tree commit diff
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
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
-rw-r--r--doc/HISTORY6
-rw-r--r--other/pamstack.c5
-rw-r--r--version.mk2
3 files changed, 12 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 0c2ce263..be66a851 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,12 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+23.08.05 BJH  Release 11.02.01
+
+              pamstack: Fail gracefully when total number of planes is too
+              large for unsigned integer.  Always broken (Pamstack was new in
+              Netpbm 10.0 (June 2002).
+
 23.03.25 BJH  Release 11.02.00
 
               jpegtopnm: Add -traceexif
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;
     }
 
diff --git a/version.mk b/version.mk
index d579dc15..bdeb8e90 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 11
 NETPBM_MINOR_RELEASE = 2
-NETPBM_POINT_RELEASE = 0
+NETPBM_POINT_RELEASE = 1