diff --git a/src/tiff/libtiff/tif_read.c b/src/tiff/libtiff/tif_read.c index 4e0e84d9f7..0d1e2c9f55 100644 --- a/src/tiff/libtiff/tif_read.c +++ b/src/tiff/libtiff/tif_read.c @@ -47,7 +47,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) { static const char module[] = "TIFFFillStripPartial"; register TIFFDirectory *td = &tif->tif_dir; - uint64 unused_data; + tmsize_t unused_data; uint64 read_offset; tmsize_t cc, to_read; /* tmsize_t bytecountm; */ @@ -117,7 +117,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart ) if( (uint64) to_read > td->td_stripbytecount[strip] - tif->tif_rawdataoff - tif->tif_rawdataloaded ) { - to_read = td->td_stripbytecount[strip] + to_read = (tmsize_t)td->td_stripbytecount[strip] - tif->tif_rawdataoff - tif->tif_rawdataloaded; }