summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSu_Laus <sulau@freenet.de>2023-02-06 21:10:30 +0100
committerSu_Laus <sulau@freenet.de>2023-02-06 21:10:30 +0100
commit3f375931757b912ebbc6ebc57c1796728adaed1f (patch)
treea52b2b5a864056836adb9f326191ca98770d202e
parentafaabc3e50d4e5d80a94143f7e3c997e7e410f68 (diff)
downloadlibtiff-git-3f375931757b912ebbc6ebc57c1796728adaed1f.tar.gz
Fix Coverity Scan issue CID 1520761: Integer handling issues (OVERFLOW_BEFORE_WIDEN) tiffcrop.c: 9676 in rotateImage()
-rw-r--r--tools/tiffcrop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
index 519871ec..d7ad5ca8 100644
--- a/tools/tiffcrop.c
+++ b/tools/tiffcrop.c
@@ -9676,7 +9676,7 @@ static int rotateImage(uint16_t rotation, struct image_data *image,
"Integer overflow when calculating buffer size.");
return (-1);
}
- buffsize = (rowsize + 1) * length;
+ buffsize = ((tmsize_t)rowsize + 1) * length;
}
bytes_per_sample = (bps + 7) / 8;