summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbfriesen <bfriesen>2016-11-12 18:35:11 +0000
committerbfriesen <bfriesen>2016-11-12 18:35:11 +0000
commitdf0e037cb3ed15f6e72ec2061d86eaf13aee6d7c (patch)
treed83fc11b7004650b171e5ec36f54eac3824592bf
parent5205feea7ad8cc8f181aa02080ccfbaaf55d5689 (diff)
downloadlibtiff-df0e037cb3ed15f6e72ec2061d86eaf13aee6d7c.tar.gz
* tools/tiffcrop.c (readContigTilesIntoBuffer): Fix
signed/unsigned comparison warning.
-rw-r--r--ChangeLog3
-rw-r--r--tools/tiffcrop.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 079e3f27..1af18a1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2016-11-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+ * tools/tiffcrop.c (readContigTilesIntoBuffer): Fix
+ signed/unsigned comparison warning.
+
* html/v4.0.7.html: Add a file to document the pending 4.0.7
release.
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
index d981b994..9e291737 100644
--- a/tools/tiffcrop.c
+++ b/tools/tiffcrop.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcrop.c,v 1.43 2016-11-11 19:33:06 erouault Exp $ */
+/* $Id: tiffcrop.c,v 1.44 2016-11-12 18:35:12 bfriesen Exp $ */
/* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of
* the image data through additional options listed below
@@ -822,7 +822,7 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf,
}
/* Add 3 padding bytes for extractContigSamplesShifted32bits */
- if( tile_buffsize > 0xFFFFFFFFU - 3 )
+ if( tile_buffsize > (tsize_t) (0xFFFFFFFFU - 3U) )
{
TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size.");
exit(-1);