[serialize] Check offset base is within (possibly end of) object
This commit is contained in:
parent
0f1a6ce826
commit
91176d5b77
|
@ -295,6 +295,7 @@ struct hb_serialize_context_t
|
||||||
{
|
{
|
||||||
const object_t::link_t &link = *link_it;
|
const object_t::link_t &link = *link_it;
|
||||||
const object_t &child = *packed[link.objidx];
|
const object_t &child = *packed[link.objidx];
|
||||||
|
assert (link.bias <= parent.tail - parent.head);
|
||||||
unsigned offset = (child.head - parent.head) - link.bias;
|
unsigned offset = (child.head - parent.head) - link.bias;
|
||||||
|
|
||||||
if (link.is_wide)
|
if (link.is_wide)
|
||||||
|
|
Loading…
Reference in New Issue