mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
The GPU fuzzer can build outline data large enough to stress the size math inside hb_gpu_draw_encode(). Several totals and byte counts were computed with unchecked unsigned arithmetic before the existing bounds checks ran. Use HarfBuzz's overflow helpers for band-index totals, encoded blob lengths, byte sizes, and recycled-buffer growth. Also rewrite the uint16-offset limit check so it does not rely on subtracting from an already-overflowed total. Testing: - meson test -C build --suite fuzzing --print-errorlogs - meson test -C build Fixes: https://oss-fuzz.com/testcase-detail/6336503637934080 Co-authored-by: OpenAI Codex <codex@openai.com>