summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qbmphandler.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-14 01:00:06 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-14 01:00:08 +0200
commit42f84de26a3445e89e6a52341a85c5ca2f132145 (patch)
tree40c82b6853621ece6a0ee49cace25c3eca72f71e /src/gui/image/qbmphandler.cpp
parentc9f316c8b90ce8bb11b6e9e0bf898c269cd35bfb (diff)
parent49efea26a5fae8c2275999c36c7c8d24cf4125de (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Diffstat (limited to 'src/gui/image/qbmphandler.cpp')
-rw-r--r--src/gui/image/qbmphandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 587f375ce7..5dff4ab0ac 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -188,6 +188,8 @@ static bool read_dib_infoheader(QDataStream &s, BMP_INFOHDR &bi)
if (!(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) ||
(nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS)))
return false; // weird compression type
+ if (bi.biWidth < 0 || quint64(bi.biWidth) * qAbs(bi.biHeight) > 16384 * 16384)
+ return false;
return true;
}