diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 5be3d372e..4e3e4d17b 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -164,7 +164,7 @@ struct LookupFormat4 } protected: - HBUINT16 format; /* Format identifier--format = 2 */ + HBUINT16 format; /* Format identifier--format = 4 */ VarSizedBinSearchArrayOf > segments; /* The actual segments. These must already be sorted, * according to the first word in each one (the last @@ -187,7 +187,7 @@ struct LookupSingle GlyphID glyph; /* Last GlyphID */ T value; /* The lookup value (only one) */ public: - DEFINE_SIZE_STATIC (4 + T::static_size); + DEFINE_SIZE_STATIC (2 + T::static_size); }; template diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 2eae09d5c..0aea6423e 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -833,7 +833,7 @@ struct VarSizedBinSearchArrayOf { TRACE_SANITIZE (this); return_trace (header.sanitize (c) && - Type::static_size >= header.unitSize && + Type::static_size <= header.unitSize && c->check_array (bytesZ.arrayZ, header.nUnits, header.unitSize)); }