mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[subset/cff2] Error handling
Fixes https://oss-fuzz.com/testcase-detail/4916785942757376
This commit is contained in:
parent
5906f90ce1
commit
2e6919d526
2 changed files with 10 additions and 2 deletions
|
@ -597,7 +597,11 @@ static bool _serialize_cff2 (hb_serialize_context_t *c,
|
|||
{ return plan.fdmap.has (&_ - &acc.fontDicts[0]); }),
|
||||
hb_iter (private_dict_infos))
|
||||
;
|
||||
if (unlikely (!fda->serialize (c, it, fontSzr))) return false;
|
||||
if (unlikely (!fda->serialize (c, it, fontSzr)))
|
||||
{
|
||||
c->pop_discard ();
|
||||
return false;
|
||||
}
|
||||
plan.info.fd_array_link = c->pop_pack (false);
|
||||
}
|
||||
|
||||
|
@ -607,7 +611,11 @@ static bool _serialize_cff2 (hb_serialize_context_t *c,
|
|||
{
|
||||
c->push ();
|
||||
auto *dest = c->start_embed<CFF2VariationStore> ();
|
||||
if (unlikely (!dest->serialize (c, acc.varStore))) return false;
|
||||
if (unlikely (!dest->serialize (c, acc.varStore)))
|
||||
{
|
||||
c->pop_discard ();
|
||||
return false;
|
||||
}
|
||||
plan.info.var_store_link = c->pop_pack (false);
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue