diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-08-04 22:35:36 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-08-04 22:35:36 -0400 |
commit | b4c1057497e2498a3391b2536aa1fbc7efe9723a (patch) | |
tree | 501dc64bdded0dc5a8db0a16fab1b462dc2b6ca2 /pango/opentype/hb-open-file-private.hh | |
parent | 076b06fdb85cd64e2a460ccb383b964dee31ebd7 (diff) | |
download | pango-b4c1057497e2498a3391b2536aa1fbc7efe9723a.tar.gz |
[HB] Add sanitize debugging facilities
Diffstat (limited to 'pango/opentype/hb-open-file-private.hh')
-rw-r--r-- | pango/opentype/hb-open-file-private.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/opentype/hb-open-file-private.hh b/pango/opentype/hb-open-file-private.hh index fc898f28..4cbe9355 100644 --- a/pango/opentype/hb-open-file-private.hh +++ b/pango/opentype/hb-open-file-private.hh @@ -48,6 +48,7 @@ struct TTCHeader; typedef struct TableDirectory { inline bool sanitize (SANITIZE_ARG_DEF, const void *base) { + SANITIZE_DEBUG (); return SANITIZE_SELF () && SANITIZE (tag) && SANITIZE_MEM (CONST_CHARP(base) + (unsigned long) offset, length); } @@ -77,6 +78,7 @@ typedef struct OffsetTable public: inline bool sanitize (SANITIZE_ARG_DEF, const void *base) { + SANITIZE_DEBUG (); if (!(SANITIZE_SELF () && SANITIZE_MEM (tableDir, sizeof (tableDir[0]) * numTables))) return false; unsigned int count = numTables; for (unsigned int i = 0; i < count; i++) @@ -113,6 +115,7 @@ struct TTCHeader } bool sanitize (SANITIZE_ARG_DEF) { + SANITIZE_DEBUG (); if (!SANITIZE (version)) return false; if (version.major < 1 || version.major > 2) return true; /* XXX Maybe we shouldn't NEUTER these offsets, they may cause a full copy of @@ -172,6 +175,7 @@ struct OpenTypeFontFile } bool sanitize (SANITIZE_ARG_DEF) { + SANITIZE_DEBUG (); switch (tag) { default: return true; case TrueTypeTag: case CFFTag: return SANITIZE_THIS (CAST (OffsetTable, *this, 0)); |