mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-28 17:19:17 +01:00
The GDEF accelerator built its per-mark-set bit-page/digest cache by materializing an hb_set_t for every mark glyph set and walking it glyph by glyph. A mark set's Coverage can name an enormous glyph range in a few bytes, and several sets can alias one all-glyphs Coverage, so a 256 KiB font with 65535 such sets cost about 1 GiB and billions of iterations in the accelerator constructor. Fill each entry directly from its Coverage table via collect_coverage() into lightweight sinks (gid extents, then a biased bit-page or a digest), so the work is proportional to the coverage records the sanitizer already budgeted for, not to the glyphs they span. Replace MarkGlyphSets::collect_coverage() with get_count() / get_coverage() accessors. Answers are identical. Adds a fuzzer regression font. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-OM3ZVHGK. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>