mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
An allocation failure can leave out-of-range glyph IDs in the GSUB set because subsequent range deletions are skipped. Building the flat glyph map from that set can then request several gigabytes before the set's error state is checked. Reject an errored GSUB glyph set before sizing the flat map, and add the minimized fuzzer testcase to the regression corpus. Tested with the full Meson suite (292 passed, one skipped) and 100 reproducer runs under ASan/UBSan with failing allocations enabled. Fixes: https://oss-fuzz.com/testcase-detail/5574495277219840 Assisted-by: OpenAI Codex