Fix collect lookups logic of FeatureTableSubstitution (#2097)

https://crbug.com/oss-fuzz/20036
pull/2100/head
Ebrahim Byagowi 5 years ago committed by GitHub
parent a32ecc15ae
commit dc03a993d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/hb-ot-layout-common.hh
  2. BIN
      test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5715299773186048

@ -2299,9 +2299,9 @@ struct FeatureTableSubstitutionRecord
{
friend struct FeatureTableSubstitution;
void collect_lookups (hb_set_t *lookup_indexes /* OUT */) const
void collect_lookups (const void *base, hb_set_t *lookup_indexes /* OUT */) const
{
return (this+feature).add_lookup_indexes_to (lookup_indexes);
return (base+feature).add_lookup_indexes_to (lookup_indexes);
}
bool sanitize (hb_sanitize_context_t *c, const void *base) const
@ -2338,7 +2338,7 @@ struct FeatureTableSubstitution
| hb_filter (feature_indexes, &FeatureTableSubstitutionRecord::featureIndex)
| hb_apply ([=] (const FeatureTableSubstitutionRecord& r)
{
r.collect_lookups (lookup_indexes);
r.collect_lookups (this, lookup_indexes);
})
;
}

Loading…
Cancel
Save