From 65afb40fc505d0bd644fb76747bd63fed5c8340a Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 19 Aug 2020 22:35:31 +0100 Subject: [PATCH] LibWeb: Crash instead of spinning if parse_drawto fails to match If parse_drawto fails to match anything, it will spin forever. Instead, print out the character that failed to match and assert false. --- Libraries/LibWeb/SVG/SVGPathElement.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp index 2c43ff0c18..632b4a6996 100644 --- a/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -133,6 +133,9 @@ void PathDataParser::parse_drawto() { parse_smooth_quadratic_bezier_curveto(); } else if (match('A') || match('a')) { parse_elliptical_arc(); + } else { + dbg() << "PathDataParser::parse_drawto failed to match: '" << ch() << "'"; + TODO(); } }