From c2681d9fc508c78b474eb6b3642f693b2a4bc9a8 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 5 Aug 2023 23:15:49 +0000 Subject: Release 11.02.01 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4576 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- doc/HISTORY | 6 ++++++ other/pamstack.c | 5 +++++ version.mk | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) 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 -- cgit 1.4.1