about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-cpu-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'qemu_mode/patches/afl-qemu-cpu-inl.h')
-rw-r--r--qemu_mode/patches/afl-qemu-cpu-inl.h4
1 files changed, 2 insertions, 2 deletions
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. */