#define SANITIZE_WITH_BASE(B,X) likely ((X).sanitize (context, CharP(B)))
-#define SANITIZE_SELF() SANITIZE_MEM(this, sizeof (*this))
-
-#define SANITIZE_MEM(B,L) likely (context->check_range (CharP(B), (L)))
+#define SANITIZE_SELF() likely(context->check_range (this, sizeof (*this)))
/* Template to sanitize an object. */
inline bool sanitize (hb_sanitize_context_t *context) {
TRACE_SANITIZE ();
return SANITIZE_SELF()
- && SANITIZE_MEM (this, this->get_size ());
+ && context->check_range (this, this->get_size ());
}
private:
inline bool sanitize_value (hb_sanitize_context_t *context, void *base, const Value *values) {
TRACE_SANITIZE ();
- return SANITIZE_MEM (values, get_size ())
+ return context->check_range (values, get_size ())
&& (!has_device () || sanitize_value_devices (context, base, values));
}
TRACE_SANITIZE ();
return SANITIZE (inputCount)
&& SANITIZE (lookupCount)
- && SANITIZE_MEM (input,
- input[0].get_size () * inputCount +
- lookupRecordX[0].get_size () * lookupCount);
+ && context->check_range (input,
+ input[0].get_size () * inputCount
+ + lookupRecordX[0].get_size () * lookupCount);
}
private: