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

Fixes https://crbug.com/oss-fuzz/16810
pull/1942/head
Ebrahim Byagowi 6 years ago committed by GitHub
parent dc9222b1dd
commit 875985cd48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/hb-subset.cc
  2. BIN
      test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5675720390475776

@ -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;

Loading…
Cancel
Save