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

Bug 592484 - invalid write in HB

Fix off-by-one.
上级 b614b004
......@@ -226,8 +226,8 @@ _hb_ot_layout_set_glyph_class (hb_face_t *face,
unsigned char *new_klasses;
new_len = len == 0 ? 120 : 2 * len;
if (new_len > 65535)
new_len = 65535;
if (new_len > 65536)
new_len = 65536;
new_klasses = (unsigned char *) realloc (layout->new_gdef.klasses, new_len * sizeof (unsigned char));
if (HB_UNLIKELY (!new_klasses))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册