mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 22:41:10 +01:00
Drop the separate HB_BUDGET_SUBSET_TABLE budget and the second hb_subset_context_t field it needed; check_ops() now charges budget_remaining (HB_BUDGET_SUBSET_GLYF, 1 << 28), the per-table budget glyf instancing already uses. Both are per-table and shared across buffer-size retries, and no table spends both. The larger budget still bounds the attack (fails after 2^28 glyph steps, ~3 s), so test_subset_shared_coverage_budget now expects the failure at 8192 shared offsets instead of 2048. Subsetting all glyphs with --layout-features='*' of Gulzar, NotoSansKR-VF and GoogleSansFlex-VF keeps GSUB/GPOS/GDEF with output byte-identical to before; the heaviest table (Gulzar GPOS) spends ~98K units, under 0.04% of the budget. Full meson test: 278 OK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>