[ENOMEM] check resize() return.

Fixes https://oss-fuzz.com/testcase-detail/5641892164009984.
This commit is contained in:
Garret Rieger 2020-07-29 12:23:37 -07:00 committed by Ebrahim Byagowi
parent 8b63de1109
commit d307c24abf
2 changed files with 2 additions and 1 deletions

View File

@ -1087,7 +1087,8 @@ struct cff1
if (num_glyphs != sc.get_num_glyphs ())
{ fini (); return; }
privateDicts.resize (fdCount);
if (unlikely (!privateDicts.resize (fdCount)))
{ fini (); return; }
for (unsigned int i = 0; i < fdCount; i++)
privateDicts[i].init ();