提交 4831e615 编写于 作者: B Behdad Esfahbod

[morx] Fix memory access issue

If buffer was enlarged, info was being outdated.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1225
上级 5a41cf6b
...@@ -546,8 +546,6 @@ struct StateTableDriver ...@@ -546,8 +546,6 @@ struct StateTableDriver
template <typename context_t> template <typename context_t>
inline void drive (context_t *c) inline void drive (context_t *c)
{ {
hb_glyph_info_t *info = buffer->info;
if (!c->in_place) if (!c->in_place)
buffer->clear_output (); buffer->clear_output ();
...@@ -556,7 +554,7 @@ struct StateTableDriver ...@@ -556,7 +554,7 @@ struct StateTableDriver
for (buffer->idx = 0;;) for (buffer->idx = 0;;)
{ {
unsigned int klass = buffer->idx < buffer->len ? 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<EntryData>::CLASS_END_OF_TEXT; (unsigned) StateTable<EntryData>::CLASS_END_OF_TEXT;
const Entry<EntryData> *entry = machine.get_entryZ (state, klass); const Entry<EntryData> *entry = machine.get_entryZ (state, klass);
if (unlikely (!entry)) if (unlikely (!entry))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册