diff options
author | van Hauser <vh@thc.org> | 2019-07-10 14:20:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 14:20:06 +0200 |
commit | 519678192ff47fe359abf3ef33938ae9dd3e52a2 (patch) | |
tree | 0bd97544280c245cecae06b843ddee54dc16ebaf /alloc-inl.h | |
parent | c3083a77d411bb0e1e4ec8bd93594de92b9b4d38 (diff) | |
parent | 891ab3951befbf480a89f63702d111a62a054758 (diff) | |
download | afl++-519678192ff47fe359abf3ef33938ae9dd3e52a2.tar.gz |
Merge pull request #12 from vanhauser-thc/MOpt
Mopt
Diffstat (limited to 'alloc-inl.h')
-rw-r--r-- | alloc-inl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/alloc-inl.h b/alloc-inl.h index d3c125fb..04f56d0d 100644 --- a/alloc-inl.h +++ b/alloc-inl.h @@ -83,10 +83,22 @@ ABORT("Use after free."); \ else ABORT("Corrupted head alloc canary."); \ } \ + } \ + } while (0) + +/* +#define CHECK_PTR(_p) do { \ + if (_p) { \ + if (ALLOC_C1(_p) ^ ALLOC_MAGIC_C1) {\ + if (ALLOC_C1(_p) == ALLOC_MAGIC_F) \ + ABORT("Use after free."); \ + else ABORT("Corrupted head alloc canary."); \ + } \ if (ALLOC_C2(_p) ^ ALLOC_MAGIC_C2) \ ABORT("Corrupted tail alloc canary."); \ } \ } while (0) +*/ #define CHECK_PTR_EXPR(_p) ({ \ typeof (_p) _tmp = (_p); \ |