提交 b7683335 编写于 作者: B Behdad Esfahbod

Disallow ligature substitutions replacing one glyph

上级 7eb87511
......@@ -345,7 +345,7 @@ struct Ligature
unsigned int i, j;
unsigned int count = component.len;
unsigned int end = MIN (c->buffer->len, c->buffer->i + c->context_length);
if (unlikely (c->buffer->i + count > end))
if (unlikely (count < 2 || c->buffer->i + count > end))
return false;
bool first_was_mark = (c->property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册