aboutsummaryrefslogtreecommitdiff
path: root/libdislocator
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-12-19 14:35:37 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2019-12-19 14:35:37 +0100
commitd8fb4a8e19b1fde9ca4b3f84d5599be824f03ee9 (patch)
tree8cfac62fd408bc4dab75f0aec0461028805d38dc /libdislocator
parent5e53d337dbfb15aef37a9f3243594d75fc4ffc25 (diff)
parentb91000fc9e2b86ffe96bef7a30d30b7e0f1f66fc (diff)
downloadafl++-d8fb4a8e19b1fde9ca4b3f84d5599be824f03ee9.tar.gz
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'libdislocator')
-rw-r--r--libdislocator/libdislocator.so.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index 33985ce9..0eb3f628 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -130,7 +130,7 @@ static u8 alloc_verbose, /* Additional debug messages */
static __thread size_t total_mem; /* Currently allocated mem */
static __thread u32 call_depth; /* To avoid recursion via fprintf() */
-static u32 alloc_canary;
+static u32 alloc_canary;
/* This is the main alloc function. It allocates one page more than necessary,
sets that tailing page to PROT_NONE, and then increments the return address
@@ -348,10 +348,10 @@ int posix_memalign(void** ptr, size_t align, size_t len) {
return 0;
}
-
+
size_t rem = len % align;
if (rem) len += align - rem;
-
+
*ptr = __dislocator_alloc(len);
if (*ptr && len) memset(*ptr, ALLOC_CLOBBER, len);