From b63ac5717479cd8264e717f4e6a2df97d352bb67 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Thu, 29 Jul 2021 18:23:41 -0700 Subject: [PATCH] [subset] bail if collection region indices is in error. --- src/hb-ot-layout-common.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index b3f9535c3..65f499a00 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2792,6 +2792,10 @@ struct VariationStore hb_set_t region_indices; for (unsigned int i = 0; i < inner_maps.length; i++) (src+src->dataSets[i]).collect_region_refs (region_indices, inner_maps[i]); + + if (region_indices.in_error ()) + return_trace (false); + region_indices.del_range ((src_regions).regionCount, hb_set_t::INVALID); /* TODO use constructor when our data-structures support that. */