mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 05:51:05 +01:00
Check ensure(glyph_count) before writing Graphite output. Release the feature values and segment and return failure when buffer growth fails. Add a small synthetic font and a bounded regression that refuses buffer growth via max_len. The normal path produces 164 glyphs; the failure path retains the original input length and reports allocation failure. Include the font generator, whose output matches the checked-in fixture. The new regression fails before the fix under ASan and passes afterward. All 276 tests pass with Graphite2 enabled; the regression also passes under ASan and UBSan. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-HEQW39B7. Assisted-by: OpenAI Codex
16 lines
893 B
Plaintext
16 lines
893 B
Plaintext
cmap-format12-only files created by ttx & remove all other cmap entries
|
|
|
|
Inconsolata-Regular.abc.widerc.ttf has the hmtx width of "c" set to 600; everything else is 500. Subsetting out c should reduce numberOfHMetrics to 1.
|
|
|
|
chromacheck-* fonts are from https://github.com/RoelN/ChromaCheck/tree/master/fonts and licensed under MIT by Roel Nieskens and Google.
|
|
|
|
RanaKufi-Regular.subset.otf is from https://github.com/alif-type/rana-kufi/ but the subset is licensed for us in MIT for the project use.
|
|
|
|
glyphs.ttf is from https://github.com/RazrFalcon/ttf-parser/blob/337e7d1/tests/fonts/glyphs.ttf
|
|
|
|
Estedad-VF.ttf, licensed under OFL 1.1, is from https://github.com/aminabedi68/Estedad
|
|
|
|
graphite2-expansion.ttf is a synthetic three-glyph font generated by
|
|
../generate-graphite2-expansion-font.py. Its Graphite substitution rule expands
|
|
each "a" to 41 glyphs, for testing buffer growth failure.
|