summaryrefslogtreecommitdiff
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-08-06 14:41:07 +0000
commit7cb72504765a8196c524c7b9ccac6d67a1728ab5 (patch)
tree86f34706b653f3863961c16f80620c96faffded9
parentc498f00ae2c24b08af7a7d8b4c2cf91aaa49b2a9 (diff)
downloadqtsvg-7cb72504765a8196c524c7b9ccac6d67a1728ab5.tar.gz
Use qFuzzyIsNull instead of isEmpty() on QRectF
Avoids an integer overflow in QOutlineMapper Fixes: oss-fuzz-24131 Change-Id: I77a280640df4971e440d3f8888d2e7036a1f2e6a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 21ae1e161c933ffae38d42fe8191975d5ad8ee6e)
-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 cf7ba75..ba0eca5 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -427,7 +427,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())) {
QTransform transform;
transform.scale(target.width() / source.width(),
target.height() / source.height());