mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 01:54:21 +01:00
[morx] Handle end-of-text conditions in Insertion
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
This commit is contained in:
1 parent
60c1397673
commit
1c76c8f6ff
1 file changed
+4
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user