aboutsummaryrefslogtreecommitdiff
path: root/libdislocator
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-12-18 11:14:12 +0100
committervan Hauser <vh@thc.org>2019-12-18 11:14:12 +0100
commit939721e2cbcf14f0f9577575c09e16be2ced25fe (patch)
treee32066cf400e512dbc05b4aa2cad4fcae7696c21 /libdislocator
parent6226e384512bad86977377b2cece2b5bc0286aa3 (diff)
downloadAFLplusplus-939721e2cbcf14f0f9577575c09e16be2ced25fe.tar.gz
v2.59c release
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);