[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 committed 2021-04-19 17:01:05 -06:00
1 parent 19e096aa97
commit 3fb62cdc14
2 files changed
+4 -1

No files matched your search

+4 -1
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 ();