mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
edge_sweep_row() computed the clipped endpoint x coordinates with int32_t subtractions before casting to int64_t. If an edge started at INT32_MIN and the scanline clipped endpoint was near zero, ey - yL overflowed before the slope multiply and UBSan flagged the raster fuzzer path. Keep the endpoint interpolation and follow-on dx math in 64-bit until clamping back to int32_t. This preserves the existing rasterizer logic while avoiding signed overflow for extreme edge coordinates. Tested: - meson test -C build Assisted-by: OpenAI Codex <codex@openai.com>