From ef24f25aee5c3d79b7f4b034ec819bd68b758828 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 17 Jul 2020 12:48:04 +0200 Subject: Use qFuzzyIsNull instead of isEmpty() on QRectF Avoids an integer overflow in QOutlineMapper Fixes: oss-fuzz-24131 Change-Id: I77a280640df4971e440d3f8888d2e7036a1f2e6a Reviewed-by: Volker Hilsheimer Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 21ae1e161c933ffae38d42fe8191975d5ad8ee6e) Reviewed-by: Qt Cherry-pick Bot --- src/svg/qsvgtinydocument.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1