[subset] Fix null pointer dereference in hvar/vvar subset (#2085)

Rest of the code assumes there is at least one subtable, lets return here if not.

* https://crbug.com/oss-fuzz/19827
* https://crbug.com/oss-fuzz/19847
pull/2086/head
Ebrahim Byagowi 5 years ago committed by GitHub
parent 8ed27757b1
commit 7950beecfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/hb-ot-var-hvar-table.hh
  2. BIN
      test/fuzzing/fonts/clusterfuzz-testcase-hb-subset-fuzzer-5641053680173056
  3. BIN
      test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5650879734874112

@ -265,6 +265,8 @@ struct hvarvvar_subset_plan_t
for (unsigned int i = 0; i < inner_maps.length; i++)
inner_maps[i].init ();
if (unlikely (!inner_sets.length || !inner_maps.length)) return;
bool retain_adv_map = false;
index_map_plans[0].init (*index_maps[0], outer_map, inner_sets, plan);
if (index_maps[0] == &Null(DeltaSetIndexMap))

Loading…
Cancel
Save