[ENOMEM] unchecked resize in CFF2.

This commit is contained in:
Garret Rieger 2020-07-30 13:57:30 -07:00 committed by Ebrahim Byagowi
parent 32f052b033
commit 7f358a55f4
2 changed files with 2 additions and 1 deletions

View File

@ -441,7 +441,8 @@ struct cff2
{ fini (); return; }
fdCount = fdArray->count;
privateDicts.resize (fdCount);
if (!privateDicts.resize (fdCount))
{ fini (); return; }
/* parse font dicts and gather private dicts */
for (unsigned int i = 0; i < fdCount; i++)