From 6eefe6d0c6d05d4d026129ae545c7b4af4b12366 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 24 Aug 2018 12:03:00 +0200 Subject: TGA handler: check for out of range image size Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: Iac35e72de743f412a65d11c58fe7faa275dc4e41 Reviewed-by: Lars Knoll (cherry picked from commit 7cfe47a8fe2f987fb2a066a696fb3d9d0afe4d65) --- src/plugins/imageformats/tga/qtgafile.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/imageformats/tga/qtgafile.cpp b/src/plugins/imageformats/tga/qtgafile.cpp index 97510df..5d086c6 100644 --- a/src/plugins/imageformats/tga/qtgafile.cpp +++ b/src/plugins/imageformats/tga/qtgafile.cpp @@ -163,6 +163,12 @@ QTgaFile::QTgaFile(QIODevice *device) if (!validDepth) { mErrorMessage = tr("Image depth not valid"); + return; + } + if (quint64(width()) * quint64(height()) > (8192 * 8192)) + { + mErrorMessage = tr("Image size exceeds limit"); + return; } int curPos = mDevice->pos(); int fileBytes = mDevice->size(); @@ -233,6 +239,8 @@ QImage QTgaFile::readImage() unsigned char yCorner = desc & 0x20; // 0 = lower, 1 = upper QImage im(imageWidth, imageHeight, QImage::Format_ARGB32); + if (im.isNull()) + return QImage(); TgaReader *reader = 0; if (bitsPerPixel == 16) reader = new Tga16Reader(); -- cgit v1.2.3 From 529f5854c1bba36befba984b1a066d3b77689f12 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Tue, 28 Aug 2018 11:37:30 +0300 Subject: Add changes file for Qt 5.11.2 Change-Id: Id37f327e4b404e20b50ceabcd754b2a61089c793 Reviewed-by: Eirik Aavitsland --- dist/changes-5.11.2 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dist/changes-5.11.2 diff --git a/dist/changes-5.11.2 b/dist/changes-5.11.2 new file mode 100644 index 0000000..8efdf5e --- /dev/null +++ b/dist/changes-5.11.2 @@ -0,0 +1,24 @@ +Qt 5.11.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.11.2 Changes * +**************************************************************************** + + - This release contains only minor code improvements. -- cgit v1.2.3