From 6eb95b3f1943f7589d32ee00c31ac1c6abbbd397 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Thu, 29 Sep 2022 14:00:32 +0200 Subject: Fix bundled libtiff compilation lzw warning and reading failure A lacking #include of stdlib.h leads to a compilation warning and runtime reading failure on some platforms. Observed on MSVC2019 in debug mode. Fix by applying commit cbd71793f58c0eda8128f799d415c56e5c64eaa5 in the upstream libtiff repo. Fixes: QTBUG-107040 Change-Id: Ic76c4627632302423d0e0f8f1b51df342e62b420 Reviewed-by: Paul Olav Tvete (cherry picked from commit 64e455da1c05a9fafe7125690053fb951268a733) Reviewed-by: Qt Cherry-pick Bot --- src/3rdparty/libtiff/libtiff/tif_lzw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/3rdparty/libtiff/libtiff/tif_lzw.c b/src/3rdparty/libtiff/libtiff/tif_lzw.c index 096824d..8c3205f 100644 --- a/src/3rdparty/libtiff/libtiff/tif_lzw.c +++ b/src/3rdparty/libtiff/libtiff/tif_lzw.c @@ -39,6 +39,7 @@ #include #include +#include /* Select the plausible largest natural integer type for the architecture */ #define SIZEOF_WORDTYPE SIZEOF_SIZE_T -- cgit v1.2.3 From ba989d06b9d338ed401b4e2a000fbeda9841a11c Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Thu, 6 Oct 2022 17:49:25 +0300 Subject: Bump version to 5.15.12 Change-Id: I2567d174e05fdbdfa4c98bac6bec51f22edbe75c --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 259b036..0b51738 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.15.11 +MODULE_VERSION = 5.15.12 -- cgit v1.2.3 From ebd31cce4253ca7bad5178b1d5a552f58b836dce Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 7 Oct 2022 09:34:30 +0200 Subject: Reject tiled tiffs with corrupt tile size early MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Work around a shortcoming in libtiff where it spends time discovering the corruption. Fixes: QTBUG-107223 Change-Id: Ib5da260fe971d0f7d808f7215bf388c443318cb4 Reviewed-by: Robert Löhning (cherry picked from commit 4f83c3ebfdb2bc97162ac1065091c195b60ff5fb) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/imageformats/tiff/qtiffhandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/imageformats/tiff/qtiffhandler.cpp b/src/plugins/imageformats/tiff/qtiffhandler.cpp index 97592b9..84cd138 100644 --- a/src/plugins/imageformats/tiff/qtiffhandler.cpp +++ b/src/plugins/imageformats/tiff/qtiffhandler.cpp @@ -361,6 +361,8 @@ bool QTiffHandler::read(QImage *image) } TIFF *const tiff = d->tiff; + if (TIFFIsTiled(tiff) && TIFFTileSize64(tiff) > uint64_t(image->sizeInBytes())) // Corrupt image + return false; const quint32 width = d->size.width(); const quint32 height = d->size.height(); -- cgit v1.2.3