crashtesting: assert with stroke width of 4.86057e+93

on import attempt of moz1322643-3.svg

Change-Id: I5f18601767212c1eb7453aacbad076099a2a5b46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167142
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-05-04 20:36:24 +01:00
parent e55074b33b
commit 21e0a2658a

View file

@ -672,9 +672,15 @@ namespace svgio::svgreader
// get stroke width; SVG does not use 0.0 == hairline, so 0.0 is no line at all
const double fStrokeWidth(getStrokeWidth().isSet() ? getStrokeWidth().solve(mrOwner) : 1.0);
if(!basegfx::fTools::more(fStrokeWidth, 0.0))
if (!basegfx::fTools::more(fStrokeWidth, 0.0))
return;
if (fStrokeWidth > std::numeric_limits<sal_Int32>::max())
{
SAL_WARN("svgio", "ignoring ludicrous stroke width: " << fStrokeWidth);
return;
}
drawinglayer::primitive2d::Primitive2DReference aNewLinePrimitive;
// if we have a line with two identical points it is not really a line,