diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2010-04-22 10:47:12 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2010-04-22 10:47:12 -0400 |
commit | 079dc40112d3908ff7b7028ea3019bfe82bf606d (patch) | |
tree | 7e1bcd844c28e18f9a40f8c3bc29891941650346 /src | |
parent | fb5904ec935d925a423401bc975ffaa22022ce1b (diff) |
Avoid overflow in TableDirectory sanitize
Diffstat (limited to 'src')
-rw-r--r-- | src/hb-open-file-private.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh index 091d994..bd8a022 100644 --- a/src/hb-open-file-private.hh +++ b/src/hb-open-file-private.hh @@ -111,7 +111,7 @@ typedef struct OffsetTable public: inline bool sanitize (SANITIZE_ARG_DEF, const void *base) { TRACE_SANITIZE (); - if (!(SANITIZE_SELF () && SANITIZE_MEM (tableDir, tableDir[0].get_size () * numTables))) return false; + if (!(SANITIZE_SELF () && SANITIZE_ARRAY (tableDir, TableDirectory::get_size (), numTables))) return false; unsigned int count = numTables; for (unsigned int i = 0; i < count; i++) if (!SANITIZE_BASE (tableDir[i], base)) |