diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-10-14 19:39:31 -0700 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-10-14 19:39:31 -0700 |
commit | 1c76c8f6ff7877e486f6e94d04b2dc65348b26d5 (patch) | |
tree | 5b46ebf8f2616211f2ac759e6faf2db4ac31b3a1 | |
parent | 60c13976733ea05e71c66c486d62e31ffbb71bac (diff) |
[morx] Handle end-of-text conditions in Insertion
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
-rw-r--r-- | src/hb-aat-layout-morx-table.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index b902fd79..544dedde 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -620,12 +620,12 @@ struct InsertionSubtable unsigned int end = buffer->out_len; buffer->move_to (mark); - if (!before) + if (buffer->idx < buffer->len && !before) buffer->copy_glyph (); /* TODO We ignore KashidaLike setting. */ for (unsigned int i = 0; i < count; i++) buffer->output_glyph (glyphs[i]); - if (!before) + if (buffer->idx < buffer->len && !before) buffer->skip_glyph (); buffer->move_to (end + count); @@ -644,12 +644,12 @@ struct InsertionSubtable unsigned int end = buffer->out_len; - if (!before) + if (buffer->idx < buffer->len && !before) buffer->copy_glyph (); /* TODO We ignore KashidaLike setting. */ for (unsigned int i = 0; i < count; i++) buffer->output_glyph (glyphs[i]); - if (!before) + if (buffer->idx < buffer->len && !before) buffer->skip_glyph (); /* Humm. Not sure where to move to. There's this wording under |