LibGfx: Abort draw_circle_arc_intersecting with 0 radius

In testing a particular website (https://www.icpms.com), WebContent
was crashing with infinite recursion in draw_circle_arc_intersecting.
Presumably, radius must be > 0 to paint something, so this trivial
patch simply returns if radius <= 0. The website in question no longer
crashes WebContent.
This commit is contained in:
Joe Petrus 2022-03-10 18:27:57 -05:00 committed by Andreas Kling
parent 83609adbdf
commit 2632f6ae65
Notes: sideshowbarker 2024-07-17 17:33:23 +09:00

View File

@ -428,7 +428,7 @@ void Painter::fill_rounded_corner(IntRect const& a_rect, int radius, Color color
void Painter::draw_circle_arc_intersecting(IntRect const& a_rect, IntPoint const& center, int radius, Color color, int thickness)
{
if (thickness <= 0)
if (thickness <= 0 || radius <= 0)
return;
// Care about clipping