mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-26 01:50:08 +00:00
LibWeb: Ensure CanvasPath::arc() nonfinite radius argument is ignored
This commit is contained in:
parent
303ebc0a67
commit
08641c9e15
Notes:
github-actions[bot]
2025-10-20 11:13:21 +00:00
Author: https://github.com/tcl3
Commit: 08641c9e15
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6516
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 84 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ void CanvasPath::bezier_curve_to(double cp1x, double cp1y, double cp2x, double c
|
|||
|
||||
WebIDL::ExceptionOr<void> CanvasPath::arc(float x, float y, float radius, float start_angle, float end_angle, bool counter_clockwise)
|
||||
{
|
||||
if (radius < 0)
|
||||
if (radius < 0 && isfinite(radius))
|
||||
return WebIDL::IndexSizeError::create(m_self->realm(), Utf16String::formatted("The radius provided ({}) is negative.", radius));
|
||||
return ellipse(x, y, radius, radius, 0, start_angle, end_angle, counter_clockwise);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue