diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 77abf457ff974e8d5570b19972e0a92b9c88ecc8..dc406f59f710844239078f56834935e0cdd0e163 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1026,6 +1026,8 @@ struct Chain if (reverse) c->buffer->reverse (); + c->sanitizer.set_object (*subtable); + subtable->dispatch (c); if (reverse) @@ -1039,6 +1041,7 @@ struct Chain subtable = &StructAfter > (*subtable); c->set_lookup_index (c->lookup_index + 1); } + c->sanitizer.reset_object (); } inline unsigned int get_size (void) const { return length; } @@ -1058,10 +1061,15 @@ struct Chain unsigned int count = subtableCount; for (unsigned int i = 0; i < count; i++) { + c->reset_object (); + if (unlikely (!c->check_struct (subtable))) + return_trace (false); + c->set_object (*subtable); if (!subtable->sanitize (c)) return_trace (false); subtable = &StructAfter > (*subtable); } + c->reset_object (); return_trace (true); }