summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-08-29 08:08:10 +0000
committerEven Rouault <even.rouault@spatialys.com>2017-08-29 08:08:10 +0000
commit71ce9dbe195e7e6300a49a0d2cc3b1bfc3883873 (patch)
treeea470b5ac7c5a3d8cf1294b9b56839be59d47ed5
parent860943a3705dcfad52ac877826e8b93d2ab1c0a7 (diff)
downloadlibtiff-git-71ce9dbe195e7e6300a49a0d2cc3b1bfc3883873.tar.gz
Fix signed vs unsigned comparison
-rw-r--r--libtiff/tif_jpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c
index af3896c5..eed13574 100644
--- a/libtiff/tif_jpeg.c
+++ b/libtiff/tif_jpeg.c
@@ -1,4 +1,4 @@
-/* $Id: tif_jpeg.c,v 1.132 2017-08-29 07:30:07 erouault Exp $ */
+/* $Id: tif_jpeg.c,v 1.133 2017-08-29 08:08:10 erouault Exp $ */
/*
* Copyright (c) 1994-1997 Sam Leffler
@@ -1511,7 +1511,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
/* For last strip, limit number of rows to its truncated height */
/* even if the codestream height is larger (which is not compliant, */
/* but that we tolerate) */
- if( nrows > td->td_imagelength - tif->tif_row && !isTiled(tif) )
+ if( (uint32)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif) )
nrows = td->td_imagelength - tif->tif_row;
/* data is expected to be read in multiples of a scanline */