* tools/tiffcrop.c (readContigTilesIntoBuffer): Fix

signed/unsigned comparison warning.
This commit is contained in:
Bob Friesenhahn 2016-11-12 18:35:11 +00:00
parent 35b7f035a7
commit d2c7f195f1
2 changed files with 5 additions and 2 deletions

View File

@ -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.

View File

@ -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);