Remove integrity check in Tag sanitize

Serves no useful purpose.
This commit is contained in:
Behdad Esfahbod 2010-04-22 13:22:41 -04:00
parent 8015a8c762
commit dc228048a8
2 changed files with 1 additions and 10 deletions

View File

@ -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, " ");

View File

@ -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 */