diff options
author | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2016-11-12 19:57:16 +0000 |
---|---|---|
committer | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2016-11-12 19:57:16 +0000 |
commit | b6779d1454ce5e5ea54fe16ce4ce74e0349745c3 (patch) | |
tree | 9df87af3083f01a1c67943c80dd23913620c8a36 | |
parent | d2c7f195f1dfaabfea39e576659b50ff84c53bfd (diff) | |
download | libtiff-git-b6779d1454ce5e5ea54fe16ce4ce74e0349745c3.tar.gz |
tmsize_t is a signed type so change casting to cast to unsigned type before compare
-rw-r--r-- | tools/tiffcrop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 9e291737..eb3d2d49 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.44 2016-11-12 18:35:12 bfriesen Exp $ */ +/* $Id: tiffcrop.c,v 1.45 2016-11-12 19:57:16 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 > (tsize_t) (0xFFFFFFFFU - 3U) ) + if( (size_t) tile_buffsize > 0xFFFFFFFFU - 3U ) { TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); exit(-1); |