[fvar] Rewrite sanitize
This commit is contained in:
parent
4a6a692e3e
commit
56c9238d3d
|
@ -101,12 +101,10 @@ struct fvar
|
||||||
return_trace (version.sanitize (c) &&
|
return_trace (version.sanitize (c) &&
|
||||||
likely (version.major == 1) &&
|
likely (version.major == 1) &&
|
||||||
c->check_struct (this) &&
|
c->check_struct (this) &&
|
||||||
|
axisSize == 20 && /* Assumed in our code. */
|
||||||
instanceSize >= axisCount * 4 + 4 &&
|
instanceSize >= axisCount * 4 + 4 &&
|
||||||
axisSize <= 1024 && /* Arbitrary, just to simplify overflow checks. */
|
get_axes ().sanitize (c) &&
|
||||||
instanceSize <= 1024 && /* Arbitrary, just to simplify overflow checks. */
|
c->check_range (get_first_instance (), instanceCount, instanceSize));
|
||||||
c->check_range (this, firstAxis) &&
|
|
||||||
c->check_range (&StructAtOffset<char> (this, firstAxis),
|
|
||||||
axisCount * axisSize + instanceCount * instanceSize));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int get_axis_count (void) const
|
inline unsigned int get_axis_count (void) const
|
||||||
|
|
Loading…
Reference in New Issue