mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 14:01:10 +01:00
* [hb-info] Skip unresolvable variation sequences in --list-unicodes _list_unicodes() asserted that every codepoint returned by hb_face_collect_variation_unicodes() also resolves via hb_font_get_variation_glyph(), but the library never guarantees that: collection reads only the cmap format 14 subtable, while lookup additionally requires a nominal cmap mapping for Default UVS ranges and a non-zero glyph for Non-Default UVS mappings. A structurally valid, sanitizer-clean font that lists an unmapped codepoint in a Default UVS range, or glyph 0 in a Non-Default UVS entry, therefore aborted hb-info --list-unicodes/--list-all/--all in any assertion-enabled build (the meson debugoptimized default). Treat a failed lookup as data and skip the sequence instead of asserting. Both library calls behave as documented, and the subsetter relies on collect_variation_unicodes() returning every listed entry, so the fix belongs in the tool. Reported by Anthropic's OSS Scanner as ordinary bug ANT-2026-DM9ORF9Z. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * [hb-info] Skip dangling LangSys feature indices in --list-features The script-sensitive path of _list_features() printed a local hb_tag_t that hb_ot_layout_table_get_feature_tags() only writes when the requested index exists. LangSys::sanitize bounds-checks the feature-index array but not its values, so a featureIndex past the end of the FeatureList left the tag uninitialised and hb-info printed stack garbage (NUL bytes under -O2, the previous tag under ASan). Initialise the tag, resolve it at the top of the per-feature loop, and honour the returned count by skipping the entry when it is zero, matching how the shaper ignores such indices. This is a tool-only defect: the library already returns zero tags for the dangling index. Reported by Anthropic's OSS Scanner as ordinary bug ANT-2026-TM7BTKMU. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>