From 4831e615d173be9c7e140be0fa9017e4d9e499af Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 5 Oct 2018 18:14:13 +0200 Subject: [PATCH] [morx] Fix memory access issue If buffer was enlarged, info was being outdated. Fixes https://github.com/harfbuzz/harfbuzz/issues/1225 --- src/hb-aat-layout-common.hh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index b0faa1db5..c6b519d81 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -546,8 +546,6 @@ struct StateTableDriver template inline void drive (context_t *c) { - hb_glyph_info_t *info = buffer->info; - if (!c->in_place) buffer->clear_output (); @@ -556,7 +554,7 @@ struct StateTableDriver for (buffer->idx = 0;;) { unsigned int klass = buffer->idx < buffer->len ? - machine.get_class (info[buffer->idx].codepoint, num_glyphs) : + machine.get_class (buffer->info[buffer->idx].codepoint, num_glyphs) : (unsigned) StateTable::CLASS_END_OF_TEXT; const Entry *entry = machine.get_entryZ (state, klass); if (unlikely (!entry))