[subset] Check vector resize() call for failure (#2389)

Other .resize() calls are checked, presumably this one should be as well.
This commit is contained in:
jfkthame 2020-05-06 21:32:24 +01:00 committed by GitHub
parent 100d40c827
commit 1026b3d0b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ static bool _serialize_cff2 (hb_serialize_context_t *c,
{
/* private dicts & local subrs */
hb_vector_t<table_info_t> private_dict_infos;
private_dict_infos.resize (plan.subset_fdcount);
if (unlikely (!private_dict_infos.resize (plan.subset_fdcount))) return false;
for (int i = (int)acc.privateDicts.length; --i >= 0 ;)
{