code start and end in qemu env vars

This commit is contained in:
Andrea Fioraldi
2019-09-17 02:11:34 +02:00
parent 5f50964176
commit 61b0a3775b

View File

@ -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; }