[kerx] Fix Format6 sanitize

Fixes https://oss-fuzz.com/v2/testcase-detail/5650286710882304
This commit is contained in:
Behdad Esfahbod 2018-10-15 21:16:58 -07:00
parent 4c27da7638
commit 11703afce6

View File

@ -513,17 +513,18 @@ struct KerxSubTableFormat6
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
printf ("%d\n", c->check_struct (this));
return_trace (likely (c->check_struct (this) &&
is_long () ?
(
u.l.rowIndexTable.sanitize (c, this) &&
u.l.columnIndexTable.sanitize (c, this) &&
c->check_range (this, u.l.array)
) : (
u.s.rowIndexTable.sanitize (c, this) &&
u.s.columnIndexTable.sanitize (c, this) &&
c->check_range (this, u.s.array)
)));
(is_long () ?
(
u.l.rowIndexTable.sanitize (c, this) &&
u.l.columnIndexTable.sanitize (c, this) &&
c->check_range (this, u.l.array)
) : (
u.s.rowIndexTable.sanitize (c, this) &&
u.s.columnIndexTable.sanitize (c, this) &&
c->check_range (this, u.s.array)
))));
}
struct accelerator_t