diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-11 10:19:31 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-11 10:19:31 +0100 |
commit | 178b8572d71a34975ffd7ada87227e1b8ed7296e (patch) | |
tree | 1ca3314f2a20983cd919c7078ae8f20eadb259de /src/3rdparty/libtiff/libtiff/tif_read.c | |
parent | 7abea3cc2d4295298e7682c755c4de9f674d55b4 (diff) | |
parent | 904aa931871fe2ebe5cc6b14a55f37658e15ee89 (diff) | |
download | qtimageformats-178b8572d71a34975ffd7ada87227e1b8ed7296e.tar.gz |
Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: Ib84ba922bb21f9e6c52c3096e7ae0fc10025c202
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 |