Blame SOURCES/qtsvg-5.15.2-clamp-parsed-doubles-to-float-representtable-values.patch

2e3332
diff -up qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp.orig qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp
2e3332
--- qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp.orig	2020-10-27 09:02:11.000000000 +0100
2e3332
+++ qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp	2021-03-09 17:48:50.187425243 +0100
2e3332
@@ -65,6 +65,7 @@
2e3332
 #include "private/qmath_p.h"
2e3332
 
2e3332
 #include "float.h"
2e3332
+#include <cmath>
2e3332
 
2e3332
 QT_BEGIN_NAMESPACE
2e3332
 
2e3332
@@ -672,6 +673,9 @@ static qreal toDouble(const QChar *&str)
2e3332
             val = -val;
2e3332
     } else {
2e3332
         val = QByteArray::fromRawData(temp, pos).toDouble();
2e3332
+        // Do not tolerate values too wild to be represented normally by floats
2e3332
+        if (std::fpclassify(float(val)) != FP_NORMAL)
2e3332
+            val = 0;
2e3332
     }
2e3332
     return val;
2e3332
 
2e3332
@@ -3043,6 +3047,8 @@ static QSvgStyleProperty *createRadialGr
2e3332
         ncy = toDouble(cy);
2e3332
     if (!r.isEmpty())
2e3332
         nr = toDouble(r);
2e3332
+    if (nr < 0.5)
2e3332
+        nr = 0.5;
2e3332
 
2e3332
     qreal nfx = ncx;
2e3332
     if (!fx.isEmpty())