mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 23:11:04 +01:00
COLR ColorLine::get_extend() cast the raw Extend byte directly to hb_paint_extend_t. Malformed tables can carry out-of-range values, which then trip UBSan enum checks in vector paint paths. Map raw extend values explicitly and fall back to PAD for unknown values. Tested: - CCACHE_DISABLE=1 ninja -C /home/behdad/harfbuzz/build-codex test/fuzzing/hb-vector-fuzzer test/fuzzing/hb-raster-fuzzer - ./build-codex/test/fuzzing/hb-vector-fuzzer test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-vector-fuzzer-5448347908636672 - ./build-codex/test/fuzzing/hb-vector-fuzzer test/fuzzing/fonts/NotoColorEmoji.subset.ttf Fixes: https://oss-fuzz.com/testcase-detail/6120408016551936 Assisted-by: OpenAI Codex