From 54842374c2b291ef208c51ae1d853ec0403ccf84 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 10 May 2010 18:13:32 -0400 Subject: [PATCH] Fix check_struct to check min_size instead of sizeof --- src/hb-open-type-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index c6c9811..7a79477 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) -- 2.7.4