Files
harfbuzz/test/api
Behdad EsfahbodandClaude Opus 4.8 fca5fc4e6b [graphite2] Clear positions when the segment has no slots
Every shaper that returns true must leave the buffer with
have_positions set; the OpenType and fallback shapers call
clear_positions() unconditionally.  _hb_graphite2_shape() borrows
pos[] as scratch via get_scratch_buffer(), which clears
have_positions, and the normal path restores it through
hb_buffer_get_glyph_positions().  But when Graphite deletes every
glyph of the run, the zero-slot early-out set buffer->len = 0 and
returned true without restoring the flag, so a later
hb_buffer_normalize_glyphs() (hb-shape --normalize-glyphs) hit
assert (buffer->have_positions) and aborted.

Restore the invariant where it is broken, by calling
buffer->clear_positions() in the empty-segment return.

Adds test_graphite2_all_glyphs_deleted, with an embedded 500-byte
font whose Silf rule deletes 'a'; shaping "aaa" must now succeed with
length 0 and positions, while the "aba" control is unchanged.

Reported by Anthropic's OSS Scanner as ordinary bug ANT-2026-BG9QJRVN.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-30 16:59:32 -06:00
..
2025-04-06 18:08:50 -06:00
2026-07-30 19:02:25 -06:00
2026-09-04 14:14:49 -06:00
2026-07-31 04:31:26 +03:00
2025-04-05 22:37:10 -06:00
2020-01-31 16:37:30 -05:00
2020-01-15 13:36:01 -08:00
2025-06-08 13:43:27 +03:00