about summary refs log tree commit diff
path: root/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-08-28 19:07:19 +0200
committerAndrea Fioraldi <andreafioraldi@gmail.com>2019-08-28 19:07:19 +0200
commit892513708bb5f68b15610fe0c74b892d4421c8cd (patch)
tree85785908c7f0a81e19e9d75c9fff74efac92373f /qemu_mode/patches/afl-qemu-cpu-translate-inl.h
parent733c8e4c349562fd02d0238be486ecbdf0640fd0 (diff)
downloadafl++-892513708bb5f68b15610fe0c74b892d4421c8cd.tar.gz
solved MAP_SIZE overflow
Diffstat (limited to 'qemu_mode/patches/afl-qemu-cpu-translate-inl.h')
-rw-r--r--qemu_mode/patches/afl-qemu-cpu-translate-inl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-translate-inl.h b/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
index f85a86d7..c0caeefc 100644
--- a/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
+++ b/qemu_mode/patches/afl-qemu-cpu-translate-inl.h
@@ -134,7 +134,7 @@ static void afl_gen_compcov(target_ulong cur_loc, TCGv_i64 arg1, TCGv_i64 arg2,
   }
   
   cur_loc  = (cur_loc >> 4) ^ (cur_loc << 8);
-  cur_loc &= MAP_SIZE - 1;
+  cur_loc &= MAP_SIZE - 7;
   
   if (cur_loc >= afl_inst_rms) return;