mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
The class-based (Chain)Context closure and depend paths called ClassDef::intersects_class() for every rule-set index / class, and each call walks the whole ClassDef, so a subtable with many classes sharing one large ClassDef was quadratic per closure visit (and thus in subsetting). Collect ClassDef::intersected_classes() of the glyph set into a set once per visit and answer the per-class query from that set. All eight call sites across ContextFormat2 and ChainContextFormat2 (closure and depend) use the precomputed set; results are identical. Adds a fuzzer regression font. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-ZCMLEQFJ. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>