33aca277bc
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/qt5-qtsvg.git#9b6d76819193e3a88471c40e2c86a7a97ed8162f
31 lines
993 B
Diff
31 lines
993 B
Diff
diff -up qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp.orig qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp
|
|
--- qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp.orig 2020-10-27 09:02:11.000000000 +0100
|
|
+++ qtsvg-everywhere-src-5.15.2/src/svg/qsvghandler.cpp 2021-03-09 17:48:50.187425243 +0100
|
|
@@ -65,6 +65,7 @@
|
|
#include "private/qmath_p.h"
|
|
|
|
#include "float.h"
|
|
+#include <cmath>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
@@ -672,6 +673,9 @@ static qreal toDouble(const QChar *&str)
|
|
val = -val;
|
|
} else {
|
|
val = QByteArray::fromRawData(temp, pos).toDouble();
|
|
+ // Do not tolerate values too wild to be represented normally by floats
|
|
+ if (std::fpclassify(float(val)) != FP_NORMAL)
|
|
+ val = 0;
|
|
}
|
|
return val;
|
|
|
|
@@ -3043,6 +3047,8 @@ static QSvgStyleProperty *createRadialGr
|
|
ncy = toDouble(cy);
|
|
if (!r.isEmpty())
|
|
nr = toDouble(r);
|
|
+ if (nr < 0.5)
|
|
+ nr = 0.5;
|
|
|
|
qreal nfx = ncx;
|
|
if (!fx.isEmpty())
|