about summary refs log tree commit diff
path: root/converter/other/pnmtops.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-03-13 16:52:05 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-03-13 16:52:05 +0000
commitfd03aaf4f817a74650ea25271b967cdb0ee2205f (patch)
tree3ea4eec97128a7014283bad8a370ec05c70bf37a /converter/other/pnmtops.c
parent770d43a13cab447428622020b035c8f03390973e (diff)
downloadnetpbm-mirror-fd03aaf4f817a74650ea25271b967cdb0ee2205f.tar.gz
netpbm-mirror-fd03aaf4f817a74650ea25271b967cdb0ee2205f.tar.xz
netpbm-mirror-fd03aaf4f817a74650ea25271b967cdb0ee2205f.zip
Fix incorrect output with a bounding box that is exactly INT_MAX high or wide
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4051 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pnmtops.c')
-rw-r--r--converter/other/pnmtops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c
index 0cbae8d6..3ca158b5 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, "