diff options
-rw-r--r-- | converter/other/pnmtops.c | 4 | ||||
-rw-r--r-- | doc/HISTORY | 6 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c index 45d856d0..8c9167fb 100644 --- a/converter/other/pnmtops.c +++ b/converter/other/pnmtops.c @@ -1012,8 +1012,8 @@ validateComputableBoundingBox(float const scols, float const bbWidth = llx + scols + 0.5; float const bbHeight = lly + srows + 0.5; - if (bbHeight < INT_MIN || bbHeight > INT_MAX || - bbWidth < INT_MIN || bbWidth > INT_MAX) + if ((double)bbHeight < INT_MIN || (double)bbHeight > INT_MAX || + (double)bbWidth < INT_MIN || (double)bbWidth > INT_MAX) pm_error("Bounding box dimensions %.1f x %.1f are too large " "for computations. " "This probably means input image width, height, " diff --git a/doc/HISTORY b/doc/HISTORY index dd608210..922320de 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,12 @@ Netpbm. CHANGE HISTORY -------------- +21.03.22 BJH Release 10.93.03 + + pnmtops: Fix incorrect output (arithmetic overflow) when + bounding box is exactly INT_MAX high or wide. Always broken. + Pnmtops was in primordial Netpbm. + 21.03.10 BJH Release 10.93.02 pnmtopng: fix incorrect transparency in output when requesting diff --git a/version.mk b/version.mk index 2d079536..daa09ece 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 93 -NETPBM_POINT_RELEASE = 2 +NETPBM_POINT_RELEASE = 3 |