From d47ef88fcd842bd13923b1b519544fa2c8d6d0eb Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Mon, 2 Sep 2019 18:53:43 +0200 Subject: minor fixes --- include/alloc-inl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/alloc-inl.h') diff --git a/include/alloc-inl.h b/include/alloc-inl.h index 4a4beff1..302d15b6 100644 --- a/include/alloc-inl.h +++ b/include/alloc-inl.h @@ -104,20 +104,26 @@ /* #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) */ -- cgit 1.4.1