diff options
author | van Hauser <vh@thc.org> | 2019-07-14 20:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-14 20:02:20 +0200 |
commit | da8e03e18a1d01cb4ea26fc8efb25c4e7708a0b5 (patch) | |
tree | 21e2f2e0bbe93341c3813d96576c5e83f62195d0 /alloc-inl.h | |
parent | 5c0830f62857bc00d1da386e3d204932f544a6ba (diff) | |
parent | 4a80dbdd10aedd3a3e70a0631aeb4e01438b634c (diff) | |
download | afl++-da8e03e18a1d01cb4ea26fc8efb25c4e7708a0b5.tar.gz |
Merge branch 'master' into shared_memory_mmap_refactor
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); \ |