[subset] Don't allow malicious fonts to insert unlimited table headers

Fixes https://crbug.com/oss-fuzz/16810
This commit is contained in:
Ebrahim Byagowi 2019-08-29 14:51:22 +04:30 committed by GitHub
parent dc9222b1dd
commit 875985cd48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -238,6 +238,11 @@ _subset_table (hb_subset_plan_t *plan,
static bool
_should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag)
{
if (!tag)
/* Drop tables with no tag as that means table header in
_hb_face_builder_reference_table */
return true;
if (plan->drop_tables->has (tag))
return true;