switch order of shmem fuzz

This commit is contained in:
van Hauser
2020-06-03 16:19:09 +02:00
parent dd0ca7335f
commit 031e4300a5
3 changed files with 10 additions and 9 deletions

View File

@ -1960,8 +1960,8 @@ void setup_testcase_shmem(afl_state_t *afl) {
afl->shm_fuzz = ck_alloc(sizeof(sharedmem_t));
// we need to set the non-instrumented mode to not overwrite the SHM_ENV_VAR
if ((afl->fsrv.shmem_fuzz =
afl_shm_init(afl->shm_fuzz, MAX_FILE + sizeof(int), 1))) {
if ((afl->fsrv.shmem_fuzz_len =
(u32 *)afl_shm_init(afl->shm_fuzz, MAX_FILE + sizeof(int), 1))) {
#ifdef USEMMAP
setenv(SHM_FUZZ_ENV_VAR, afl->shm_fuzz->g_shm_file_path, 1);
@ -1972,7 +1972,7 @@ void setup_testcase_shmem(afl_state_t *afl) {
ck_free(shm_str);
#endif
afl->fsrv.support_shmem_fuzz = 1;
afl->fsrv.shmem_fuzz_len = (u32 *)(afl->fsrv.shmem_fuzz + MAX_FILE);
afl->fsrv.shmem_fuzz = (u8 *)(afl->fsrv.shmem_fuzz + sizeof(int));
} else {