Blame SOURCES/qtbase-CVE-2021-38593.patch

768443
From 6b400e3147dcfd8cc3a393ace1bd118c93762e0c Mon Sep 17 00:00:00 2001
768443
From: Eirik Aavitsland <eirik.aavitsland@qt.io>
768443
Date: Fri, 23 Jul 2021 15:53:56 +0200
768443
Subject: [PATCH] Improve fix for avoiding huge number of tiny dashes
768443
MIME-Version: 1.0
768443
Content-Type: text/plain; charset=UTF-8
768443
Content-Transfer-Encoding: 8bit
768443
768443
Some pathological cases were not caught by the previous fix.
768443
768443
Fixes: QTBUG-95239
768443
Pick-to: 6.2 6.1 5.15
768443
Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
768443
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
768443
---
768443
 src/gui/painting/qpaintengineex.cpp | 2 +-
768443
 1 file changed, 1 insertion(+), 1 deletion(-)
768443
768443
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
768443
index 9fe51082..22e1b18f 100644
768443
--- a/src/gui/painting/qpaintengineex.cpp
768443
+++ b/src/gui/painting/qpaintengineex.cpp
768443
@@ -426,7 +426,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen)
768443
         patternLength *= pw;
768443
         if (qFuzzyIsNull(patternLength)) {
768443
             pen.setStyle(Qt::NoPen);
768443
-        } else if (extent / patternLength > 10000) {
768443
+        } else if (qFuzzyIsNull(extent) || extent / patternLength > 10000) {
768443
             // approximate stream of tiny dashes with semi-transparent solid line
768443
             pen.setStyle(Qt::SolidLine);
768443
             QColor color(pen.color());