about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--qemu_mode/patches/afl-qemu-cpu-inl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-inl.h b/qemu_mode/patches/afl-qemu-cpu-inl.h
index 13ec4fc8..9933be5c 100644
--- a/qemu_mode/patches/afl-qemu-cpu-inl.h
+++ b/qemu_mode/patches/afl-qemu-cpu-inl.h
@@ -181,6 +181,11 @@ static void afl_setup(void) {
     afl_end_code = (abi_ulong)-1;
 
   }
+  
+  if (getemv("AFL_CODE_START"))
+    afl_start_code = strtoll(getenv("AFL_CODE_START"), NULL, 16);
+  if (getemv("AFL_CODE_END"))
+    afl_end_code = strtoll(getenv("AFL_CODE_END"), NULL, 16);
 
   /* Maintain for compatibility */
   if (getenv("AFL_QEMU_COMPCOV")) { afl_compcov_level = 1; }