diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index c6c9811a0..7a794777b 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -243,7 +243,7 @@ struct hb_sanitize_context_t template inline bool check_struct (const Type *obj) const { - return likely (this->check_range (obj, sizeof (*obj))); + return likely (this->check_range (obj, obj->min_size)); } inline bool can_edit (const void *base HB_UNUSED, unsigned int len HB_UNUSED)