OLD | NEW |
| (Empty) |
1 diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-pr
ivate.hh | |
2 index 6ff15d2..dafca7f 100644 | |
3 --- a/src/hb-ot-layout-gsubgpos-private.hh | |
4 +++ b/src/hb-ot-layout-gsubgpos-private.hh | |
5 @@ -1498,6 +1498,7 @@ struct ContextFormat3 | |
6 TRACE_SANITIZE (this); | |
7 if (!c->check_struct (this)) return TRACE_RETURN (false); | |
8 unsigned int count = glyphCount; | |
9 + if (!count) return TRACE_RETURN (false); /* We want to access coverage[0] f
reely. */ | |
10 if (!c->check_array (coverage, coverage[0].static_size, count)) return TRAC
E_RETURN (false); | |
11 for (unsigned int i = 0; i < count; i++) | |
12 if (!coverage[i].sanitize (c, this)) return TRACE_RETURN (false); | |
13 @@ -2109,6 +2110,7 @@ struct ChainContextFormat3 | |
14 if (!backtrack.sanitize (c, this)) return TRACE_RETURN (false); | |
15 OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (bac
ktrack); | |
16 if (!input.sanitize (c, this)) return TRACE_RETURN (false); | |
17 + if (!input.len) return TRACE_RETURN (false); /* To be consistent with Conte
xt. */ | |
18 OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> >
(input); | |
19 if (!lookahead.sanitize (c, this)) return TRACE_RETURN (false); | |
20 ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookah
ead); | |
OLD | NEW |