File kdegraphics3-prevent-svg-infiniteloop.patch of Package kdegraphics3
diff -Naru kdegraphics-3.5.10_orig/ksvg/impl/svgpathparser.cc kdegraphics-3.5.10/ksvg/impl/svgpathparser.cc
--- kdegraphics-3.5.10_orig/ksvg/impl/svgpathparser.cc 2005-10-10 23:56:52.000000000 +0900
+++ kdegraphics-3.5.10/ksvg/impl/svgpathparser.cc 2024-11-01 12:31:49.314137291 +0900
@@ -480,6 +480,10 @@
th0 = atan2(y0 - yc, x0 - xc);
th1 = atan2(y1 - yc, x1 - xc);
+ // prevent infinite loop (n_segs)
+ if (isnan(th0)) th0 = 0;
+ if (isnan(th1)) th1 = 0;
+
th_arc = th1 - th0;
if(th_arc < 0 && sweepFlag)
th_arc += 2 * M_PI;