diff options
author | van Hauser <vh@thc.org> | 2021-01-15 15:12:27 +0100 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2021-01-15 15:12:27 +0100 |
commit | fba8790e322ab933df9851f0cf6ce9ca941f3814 (patch) | |
tree | 826be81b77a39afd0fd7a66b488c356f292e7fc3 /instrumentation/afl-compiler-rt.o.c | |
parent | 8eb00a5dfab01330f576d173038a9561951371ec (diff) | |
download | afl++-fba8790e322ab933df9851f0cf6ce9ca941f3814.tar.gz |
better error reporting
Diffstat (limited to 'instrumentation/afl-compiler-rt.o.c')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index f194510e..b735d8df 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -366,6 +366,18 @@ static void __afl_map_shm(void) { #else u32 shm_id = atoi(id_str); + if (__afl_map_size && __afl_map_size > MAP_SIZE) { + + u8 *map_env = getenv("AFL_MAP_SIZE"); + if (!map_env || atoi(map_env) < MAP_SIZE) { + + send_forkserver_error(FS_ERROR_MAP_SIZE); + _exit(1); + + } + + } + __afl_area_ptr = shmat(shm_id, (void *)__afl_map_addr, 0); /* Whooooops. */ |