SIGN IN SIGN UP

Fix heap buffer overflow from short truncation of span Y coordinate

SW_FT_Span.y is a 16-bit short, so limit our coordinates appropriately.
The clamp (and its "is an integer" comment) was inherited from upstream
FreeType's ftgrays.c, where FT_Span has no y field and the
scanline y is carried separately as an int. rlottie added a `short y` to
the span struct without adapting the clamp, so the INT_MAX bound never
prevented the (short) narrowing at the store site.
M
Michal Maciola committed
f487eff2f8086b84ae1c7faa0418abec909e874b
Parent: bf689b7
Committed by JoogabYun <40262755+JoogabYun@users.noreply.github.com> on 7/3/2026, 9:41:57 AM