diff options
author | van Hauser <vh@thc.org> | 2022-03-17 16:30:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 16:30:29 +0100 |
commit | 1bea949f34fb437a60ca772787a9018a3ba79053 (patch) | |
tree | 59d6f7ef2222cb92835d08398de3a1d32d2f8528 /nyx_mode/custom_harness/example.c | |
parent | 3c11a377570512efeb3a197148ff1b7dddbd8e32 (diff) | |
parent | 1a65df2beee0a68bd5198a44f42ae1346f7ee231 (diff) | |
download | afl++-1bea949f34fb437a60ca772787a9018a3ba79053.tar.gz |
Merge branch 'dev' into newpm2
Diffstat (limited to 'nyx_mode/custom_harness/example.c')
-rw-r--r-- | nyx_mode/custom_harness/example.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nyx_mode/custom_harness/example.c b/nyx_mode/custom_harness/example.c index dd268534..a67d42c6 100644 --- a/nyx_mode/custom_harness/example.c +++ b/nyx_mode/custom_harness/example.c @@ -7,7 +7,7 @@ #define TRACE_BUFFER_SIZE (64) #define PAGE_SIZE 0x1000 -#define MMAP_SIZE(x) ((x & ~(PAGE_SIZE-1)) + PAGE_SIZE) +#define MMAP_SIZE(x) ((x & ~(PAGE_SIZE - 1)) + PAGE_SIZE) int main(int argc, char **argv) { @@ -30,8 +30,9 @@ int main(int argc, char **argv) { /* this is our "bitmap" that is later shared with the fuzzer (you can also * pass the pointer of the bitmap used by compile-time instrumentations in * your target) */ - uint8_t *trace_buffer = mmap(NULL, MMAP_SIZE(TRACE_BUFFER_SIZE), PROT_READ | - PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); + uint8_t *trace_buffer = + mmap(NULL, MMAP_SIZE(TRACE_BUFFER_SIZE), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANONYMOUS, -1, 0); memset(trace_buffer, 0, TRACE_BUFFER_SIZE); // makes sure that the bitmap buffer is already // mapped into the guest's memory (alternatively |