[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
This commit is contained in:
Ebrahim Byagowi 2020-01-06 21:25:00 +03:30 committed by GitHub
parent 8ed27757b1
commit 7950beecfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 0 deletions

View File

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