File 0012-Use-qFuzzyIsNull-instead-of-isEmpty-on-QRectF.patch of Package libqt5-qtsvg.21342

From 6bddc571fdfa5bd88700c6de6e901caa0fbbb5fa Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@qt.io>
Date: Fri, 17 Jul 2020 12:48:04 +0200
Subject: [PATCH 12/21] 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)
(cherry picked from commit 7cb72504765a8196c524c7b9ccac6d67a1728ab5)
---
 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 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());
-- 
2.20.1

openSUSE Build Service is sponsored by