diff options
author | vanhauser-thc <vh@thc.org> | 2021-12-30 10:37:16 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-12-30 10:37:16 +0100 |
commit | fd9f61a8c5c4df80a313945f323e12749470f88b (patch) | |
tree | 402015c6f2a5e8d1a200cd0f44b08bed50eab4f4 /src/afl-forkserver.c | |
parent | 02082bcd2e0928a436593ef67ba84af1c87287e4 (diff) | |
download | afl++-fd9f61a8c5c4df80a313945f323e12749470f88b.tar.gz |
fix map size for nyx
Diffstat (limited to 'src/afl-forkserver.c')
-rw-r--r-- | src/afl-forkserver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c index 5ff82916..4d57b95d 100644 --- a/src/afl-forkserver.c +++ b/src/afl-forkserver.c @@ -387,7 +387,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv, char *ignore_autodict = getenv("AFL_NO_AUTODICT"); #ifdef __linux__ - if (fsrv->nyx_mode) { + if (unlikely(fsrv->nyx_mode)) { if (fsrv->nyx_runner != NULL) { return; } @@ -420,9 +420,11 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv, if (fsrv->nyx_runner == NULL) { FATAL("Something went wrong ..."); } - fsrv->map_size = + u32 tmp_map_size = fsrv->nyx_handlers->nyx_get_bitmap_buffer_size(fsrv->nyx_runner); fsrv->real_map_size = fsrv->map_size; + fsrv->map_size = (((tmp_map_size + 63) >> 6) << 6); + if (!be_quiet) { ACTF("Target map size: %u", fsrv->real_map_size); } fsrv->trace_bits = fsrv->nyx_handlers->nyx_get_bitmap_buffer(fsrv->nyx_runner); |