Files
harfbuzz/src
Behdad EsfahbodandClaude Opus 4.8 cd570b6f54 [aat] Match morx language-tag features against ltag without interning the font's tags
Chain::compile_flags() resolved every type-39 (language tag) feature
record by interning the font's ltag string with
hb_language_from_string(), whose process-wide language list is a
linear, never-freed linked list meant for the handful of languages an
application passes in.  A font controls both the number of records and
the number of distinct tags, so shape-plan creation became quadratic
(about a minute for a 125 KB font) and the tags stayed in the list for
the life of the process.

Add ltag::matches_language(i, specific), which compares the tag bytes
directly against the buffer language, applying the same
canonicalization hb_language_from_string() does (at most 63 bytes,
lowercase, '_' to '-', stop at the first other non-alphanumeric) and
the same prefix rule as hb_language_matches(); each record now costs
at most the length of the buffer's language and nothing is added to
the global list.  get_language() is kept for the name table, which
genuinely needs an hb_language_t.  Behaviour is unchanged for every
real tag; only a degenerate tag with no valid leading byte, which used
to become the empty/invalid language, now matches nothing.

Adds a regression font to the in-house aat-morx tests whose type-39
features gate substitutions by tags 'sr' and 'Zh_Hant', exercising
case folding, '_' canonicalization, subtag prefix matching and
non-matches.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-KYZIZMO6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-02 10:52:07 -06:00
..
2026-08-12 18:27:23 -06:00
2026-03-10 09:56:47 -03:00
2026-03-09 22:37:07 -06:00
2024-03-30 02:20:21 +02:00
2026-07-31 04:31:26 +03:00
2026-07-31 04:31:26 +03:00
2025-03-13 01:07:35 -06:00
…
2025-10-17 15:23:05 -06:00
2025-03-12 23:56:52 -06:00
2023-02-21 18:07:53 +02:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-10-22 19:31:32 +03:00
2026-10-16 00:19:21 +03:00
2025-03-24 00:33:53 +02:00
2025-09-15 23:56:25 -06:00
…
…
2026-04-20 05:10:48 +02:00
2026-04-20 05:10:48 +02:00
2024-10-27 16:14:53 -07:00
…
2026-10-22 17:05:31 +03:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2025-04-08 01:58:10 -06:00
2025-08-07 22:38:58 -06:00
2026-07-31 17:49:40 +03:00
2026-07-31 17:49:40 +03:00
2023-02-11 23:52:58 +02:00
2025-08-07 22:38:58 -06:00
2026-03-19 00:45:24 +02:00
2024-04-16 17:10:09 -06:00
2026-07-31 04:31:26 +03:00
2026-09-21 00:41:07 +03:00
2026-04-18 10:58:44 -06:00
2026-09-21 00:41:07 +03:00
2026-08-26 22:27:05 +03:00
2026-08-19 16:00:05 -06:00
2025-07-23 21:39:23 +03:00
2024-08-23 08:58:50 -06:00
2026-07-31 17:49:40 +03:00
2025-01-11 18:13:18 +02:00
2026-07-30 12:00:47 -06:00
2026-10-01 16:27:20 -06:00
2026-07-31 17:49:40 +03:00
…
2023-04-27 00:48:00 +02:00
2025-08-28 15:58:39 -06:00
2026-04-20 01:29:49 +02:00
2026-10-22 19:31:32 +03:00
2025-03-07 18:19:29 -07:00
2026-08-12 18:33:09 -06:00
…
2026-06-05 13:44:29 +02:00
…