summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-07-17 12:48:04 +0200
committerRobert Loehning <robert.loehning@qt.io>2020-07-30 22:23:43 +0200
commit21ae1e161c933ffae38d42fe8191975d5ad8ee6e (patch)
tree0a931775d60dd27cf5620a2fa03ab6b482223e6c /src
parent3f11586d79566c9ceb311c6c4a1ea12078deed5d (diff)
downloadqtsvg-21ae1e161c933ffae38d42fe8191975d5ad8ee6e.tar.gz
Use qFuzzyIsNull instead of isEmpty() on QRectF
Avoids an integer overflow in QOutlineMapper Fixes: oss-fuzz-24131 Pick-to: 5.12 5.15 Change-Id: I77a280640df4971e440d3f8888d2e7036a1f2e6a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/svg/qsvgtinydocument.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index b1bde78..12dd979 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -433,7 +433,7 @@ void QSvgTinyDocument::mapSourceToTarget(QPainter *p, const QRectF &targetRect,
if (source.isEmpty())
source = viewBox();
- if (source != target && !source.isEmpty()) {
+ if (source != target && !qFuzzyIsNull(source.width()) && !qFuzzyIsNull(source.height())) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
if (m_implicitViewBox || !preserveAspectRatio()) {
// Code path used when no view box is set, or IgnoreAspectRatio requested