diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index d1bcf8ea1..fde4d7fee 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -406,15 +406,6 @@ struct Tag : ULONG /* What the char* converters return is NOT nul-terminated. Print using "%.4s" */ inline operator const char* (void) const { return CharP(this); } inline operator char* (void) { return CharP(this); } - - inline bool sanitize (SANITIZE_ARG_DEF) { - TRACE_SANITIZE (); - /* Note: Only accept ASCII-visible tags (mind DEL) - * This is one of the few places (only place?) that we check - * for data integrity, as opposed to just boundary checks. - */ - return SANITIZE_SELF () && (((uint32_t) *this) & 0x80808080) == 0; - } }; ASSERT_SIZE (Tag, 4); DEFINE_NULL_DATA (Tag, 4, " "); diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 38d19835e..4973a1351 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -55,7 +55,7 @@ struct Record inline bool sanitize (SANITIZE_ARG_DEF, void *base) { TRACE_SANITIZE (); - return SANITIZE (tag) && SANITIZE_BASE (offset, base); + return SANITIZE_SELF () && SANITIZE_BASE (offset, base); } Tag tag; /* 4-byte Tag identifier */