Fix check_struct to check min_size instead of sizeof

pull/1/head
Behdad Esfahbod 15 years ago
parent ed07422c33
commit 54842374c2
  1. 2
      src/hb-open-type-private.hh

@ -243,7 +243,7 @@ struct hb_sanitize_context_t
template <typename Type>
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)

Loading…
Cancel
Save