[subset] bail if region_map is in error.

Fixes fuzzer case https://oss-fuzz.com/testcase-detail/5499162606043136.
This commit is contained in:
Garret Rieger 2021-06-29 13:14:26 -07:00
parent 79e8b30609
commit 48edbef96f
1 changed files with 1 additions and 0 deletions

View File

@ -2788,6 +2788,7 @@ struct VariationStore
hb_inc_bimap_t region_map; hb_inc_bimap_t region_map;
for (unsigned int i = 0; i < inner_maps.length; i++) for (unsigned int i = 0; i < inner_maps.length; i++)
(src+src->dataSets[i]).collect_region_refs (region_map, inner_maps[i]); (src+src->dataSets[i]).collect_region_refs (region_map, inner_maps[i]);
if (region_map.in_error()) return_trace (false);
region_map.sort (); region_map.sort ();
if (unlikely (!regions.serialize_serialize (c, &(src+src->regions), region_map))) if (unlikely (!regions.serialize_serialize (c, &(src+src->regions), region_map)))