[glyf] Increase CompositeGlyf memory allocation

The 50% wasn't justified by logic.
This commit is contained in:
Behdad Esfahbod 2023-04-21 12:37:51 -06:00
parent 290cef39be
commit 33972b3bf6
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ struct CompositeGlyph
/* try to allocate more memories than source glyph bytes
* in case that there might be an overflow for int8 value
* and we would need to use int16 instead */
char *o = (char *) hb_calloc (source_len + source_len/2, sizeof (char));
char *o = (char *) hb_calloc (source_len * 2, sizeof (char));
if (unlikely (!o)) return false;
const CompositeGlyphRecord *c = reinterpret_cast<const CompositeGlyphRecord *> (source_bytes.arrayZ + GlyphHeader::static_size);