mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
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:
parent
83609adbdf
commit
2632f6ae65
Notes:
sideshowbarker
2024-07-17 17:33:23 +09:00
Author: https://github.com/japetrus Commit: https://github.com/SerenityOS/serenity/commit/2632f6ae65 Pull-request: https://github.com/SerenityOS/serenity/pull/12995
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user