mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 01:23:56 +01:00
hb_gpu_draw_get_extents() cast rounded bounds to hb_position_t before subtracting them. A fuzzed glyph outline with an extreme negative bound could therefore overflow signed int arithmetic while forming width or height. Compute the rounded bounds in double, reject non-finite values, and clamp the exported extents to hb_position_t before returning them. Add an API regression that covers the OSS-Fuzz testcase through the public GPU draw API. Fixes: https://oss-fuzz.com/testcase-detail/5918954634936320 Tested: meson test -C build --print-errorlogs Assisted-by: OpenAI Codex