[subset] Fix integer underflow in ContextFormat2.

pull/2682/head
Garret Rieger 4 years ago
parent ac3f859a30
commit 8c3d4de796
  1. 2
      src/hb-ot-layout-gsubgpos.hh
  2. BIN
      test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5689082504806400

@ -1859,7 +1859,7 @@ struct ContextFormat2
const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
bool ret = true;
unsigned non_zero_index = 0, index = 0;
int non_zero_index = 0, index = 0;
for (const hb_pair_t<unsigned, const OffsetTo<RuleSet>&> _ : + hb_enumerate (ruleSet)
| hb_filter (klass_map, hb_first))
{

Loading…
Cancel
Save