mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 09:21:06 +01:00
hb_extents_t::to_glyph_extents() rounded bounds to hb_position_t before subtracting them. Extreme extents from fuzzed VARC and raster paths could therefore overflow signed int arithmetic while forming glyph widths or heights. Compute the rounded endpoints in double, clamp the exported values to hb_position_t, and reject non-finite results. Also avoid the same overflow in the reverse hb_glyph_extents_t constructor, add an internal regression for the shared helper, and include the minimized raster testcase. Fixes: https://oss-fuzz.com/testcase-detail/4826864710647808 Not-tested: Skipped by request. Assisted-by: OpenAI Codex