[subset] fail on offset overflow in tables that we don't repack.

Fixes: https://oss-fuzz.com/testcase-detail/5229304507138048
This commit is contained in:
Garret Rieger 2021-04-05 15:48:34 -07:00
parent 19e096aa97
commit 3fb62cdc14
2 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,10 @@ _repack (hb_tag_t tag, const hb_serialize_context_t& c)
{
if (tag != HB_OT_TAG_GPOS
&& tag != HB_OT_TAG_GSUB)
return c.copy_blob ();
{
// Check for overflow in a non-handled table.
return c.successful () ? c.copy_blob () : nullptr;
}
if (!c.offset_overflow ())
return c.copy_blob ();