mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 14:01:10 +01:00
The vector color_glyph callback can re-enter painting through PaintColrGlyph, creating an unbounded callback recursion path that does not consume COLR paint-context depth counters. Track active color glyphs to reject immediate/indirect cycles and add a hard nested callback depth cap based on HB_MAX_NESTING_LEVEL. Tested: - CCACHE_DISABLE=1 ninja -C /home/behdad/harfbuzz/build-codex test/fuzzing/hb-vector-fuzzer - for f in test/fuzzing/fonts/crash-* test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-vector-fuzzer-*; do ./build-codex/test/fuzzing/hb-vector-fuzzer "$f"; done Fixes: https://oss-fuzz.com/testcase-detail/5985308075425792 Assisted-by: OpenAI Codex