Bug 592484 - invalid write in HB

Fix off-by-one.
This commit is contained in:
Behdad Esfahbod 2009-08-20 14:01:37 -04:00
parent b614b00472
commit f0c7540c4e
1 changed files with 2 additions and 2 deletions

View File

@ -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))