From 21ae1e161c933ffae38d42fe8191975d5ad8ee6e 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 Pick-to: 5.12 5.15 Change-Id: I77a280640df4971e440d3f8888d2e7036a1f2e6a Reviewed-by: Volker Hilsheimer Reviewed-by: Allan Sandfeld Jensen --- src/svg/qsvgtinydocument.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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