[kbts] Fix buffer access (#5660)

This commit is contained in:
Behdad Esfahbod authored and GitHub committed 2025-11-29 16:14:30 -07:00
1 parent 47718c5c71
commit 31eac71703
1 file changed
+5 -2
+5 -2
View File
@@ -172,10 +172,10 @@ _hb_kbts_shape (hb_shape_plan_t *shape_plan,
}
uint32_t glyph_count = 0;
hb_glyph_info_t *info = buffer->info;
hb_glyph_position_t *pos = buffer->pos;
kbts_glyph *kb_glyph = nullptr;
kbts_glyph_iterator kb_output;
hb_glyph_info_t *info;
hb_glyph_position_t *pos;
kbts_shape_config *kb_shape_config = kbts_CreateShapeConfig (kb_font, kb_script, kb_language, nullptr, nullptr);
hb_bool_t res = kbts_ShapeDirect (kb_shape_config, kb_glyph_storage, kb_direction,
@@ -191,6 +191,9 @@ _hb_kbts_shape (hb_shape_plan_t *shape_plan,
buffer->clear_positions ();
info = buffer->info;
pos = buffer->pos;
for (auto it = kb_output; kbts_GlyphIteratorNext (&it, &kb_glyph); info++, pos++)
{
info->codepoint = kb_glyph->Id;