From 031e4300a581e196961cdc49836c284f23313635 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Wed, 3 Jun 2020 16:19:09 +0200 Subject: switch order of shmem fuzz --- qemu_mode/patches/afl-qemu-cpu-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qemu_mode/patches/afl-qemu-cpu-inl.h') diff --git a/qemu_mode/patches/afl-qemu-cpu-inl.h b/qemu_mode/patches/afl-qemu-cpu-inl.h index 78f607aa..d3893066 100644 --- a/qemu_mode/patches/afl-qemu-cpu-inl.h +++ b/qemu_mode/patches/afl-qemu-cpu-inl.h @@ -147,8 +147,8 @@ static void afl_map_shm_fuzz(void) { if (id_str) { u32 shm_id = atoi(id_str); - shared_buf = shmat(shm_id, NULL, 0); - shared_buf_len = (u32 *)(shared_buf + MAX_FILE); + shared_buf_len = (u32 *)shmat(shm_id, NULL, 0); + shared_buf = (u8 *)(shared_buf_len + sizeof(int)); /* Whooooops. */ -- cgit 1.4.1