diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-04 09:41:07 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-04 09:41:08 +0100 |
commit | 904aa931871fe2ebe5cc6b14a55f37658e15ee89 (patch) | |
tree | af3c1cd4286d8c34deaba9e5bdea41925bcc3c01 /src/3rdparty/libtiff/libtiff/tif_read.c | |
parent | 2f61f401187d55bb0304591f27792a63a38db00e (diff) | |
parent | 335dc6af7d24c1731cbd7e03a21e66c70d81760d (diff) | |
download | qtimageformats-904aa931871fe2ebe5cc6b14a55f37658e15ee89.tar.gz |
Merge remote-tracking branch 'origin/5.11.3' into 5.11
Change-Id: I5ef5083941390a0b9d9fe59b63a744e5a1aecf18
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_read.c')
-rw-r--r-- | src/3rdparty/libtiff/libtiff/tif_read.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_read.c b/src/3rdparty/libtiff/libtiff/tif_read.c index 2ba985a..e63810c 100644 --- a/src/3rdparty/libtiff/libtiff/tif_read.c +++ b/src/3rdparty/libtiff/libtiff/tif_read.c @@ -1,5 +1,3 @@ -/* $Id: tif_read.c,v 1.66 2017-11-17 20:21:00 erouault Exp $ */ - /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. @@ -58,7 +56,7 @@ static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, int is_strip, uint32 strip_or_tile, const char* module ) { -#if SIZEOF_VOIDP == 8 || SIZEOF_SIZE_T == 8 +#if SIZEOF_SIZE_T == 8 tmsize_t threshold = INITIAL_THRESHOLD; #endif tmsize_t already_read = 0; @@ -73,7 +71,7 @@ static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, { tmsize_t bytes_read; tmsize_t to_read = size - already_read; -#if SIZEOF_VOIDP == 8 || SIZEOF_SIZE_T == 8 +#if SIZEOF_SIZE_T == 8 if( to_read >= threshold && threshold < MAX_THRESHOLD && already_read + to_read + rawdata_offset > tif->tif_rawdatasize ) { @@ -348,6 +346,13 @@ TIFFSeek(TIFF* tif, uint32 row, uint16 sample ) return 0; whole_strip = tif->tif_dir.td_stripbytecount[strip] < 10 || isMapped(tif); + if( td->td_compression == COMPRESSION_LERC || + td->td_compression == COMPRESSION_JBIG ) + { + /* Ideally plugins should have a way to declare they don't support + * chunk strip */ + whole_strip = 1; + } #else whole_strip = 1; #endif |