[morx/kerx] Limit range to subtable when sanitizing

This commit is contained in:
Behdad Esfahbod 2018-11-22 22:16:12 -05:00
parent a9fe787a11
commit 758c9d68e2
2 changed files with 4 additions and 0 deletions

View File

@ -953,10 +953,12 @@ struct KerxTable
unsigned int count = thiz()->tableCount;
for (unsigned int i = 0; i < count; i++)
{
c->set_object (*st);
if (unlikely (!st->sanitize (c)))
return_trace (false);
st = &StructAfter<SubTable> (*st);
}
c->reset_object ();
return_trace (true);
}

View File

@ -1061,10 +1061,12 @@ struct Chain
unsigned int count = subtableCount;
for (unsigned int i = 0; i < count; i++)
{
c->set_object (*subtable);
if (!subtable->sanitize (c))
return_trace (false);
subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
}
c->reset_object ();
return_trace (true);
}