diff options
| author | jon <jon@jonathans-air.lan> | 2021-12-27 01:45:12 +0000 |
|---|---|---|
| committer | jon <jon@odroid.lan> | 2021-12-27 02:28:34 +0000 |
| commit | 81aae9b54c06fd6de2d0caa8a99dfad8f40ae944 (patch) | |
| tree | 6f6cd0f83bc51ce097a780e90bc1769bd88813bb /frida_mode/src/persistent | |
| parent | 54eca027a5b234c530a59e340a3ad617d1f24384 (diff) | |
| download | afl++-81aae9b54c06fd6de2d0caa8a99dfad8f40ae944.tar.gz | |
Changes to explicitly place the previous_pc
Diffstat (limited to 'frida_mode/src/persistent')
| -rw-r--r-- | frida_mode/src/persistent/persistent_arm64.c | 8 | ||||
| -rw-r--r-- | frida_mode/src/persistent/persistent_x64.c | 8 | ||||
| -rw-r--r-- | frida_mode/src/persistent/persistent_x86.c | 8 |
3 files changed, 21 insertions, 3 deletions
diff --git a/frida_mode/src/persistent/persistent_arm64.c b/frida_mode/src/persistent/persistent_arm64.c index 48f29bb0..16ecf39c 100644 --- a/frida_mode/src/persistent/persistent_arm64.c +++ b/frida_mode/src/persistent/persistent_arm64.c @@ -236,7 +236,13 @@ static void instrument_exit(GumArm64Writer *cw) { static int instrument_afl_persistent_loop_func(void) { int ret = __afl_persistent_loop(persistent_count); - instrument_previous_pc = instrument_hash_zero; + if (instrument_previous_pc_addr == NULL) { + + FATAL("instrument_previous_pc_addr uninitialized"); + + } + + *instrument_previous_pc_addr = instrument_hash_zero; return ret; } diff --git a/frida_mode/src/persistent/persistent_x64.c b/frida_mode/src/persistent/persistent_x64.c index 13d6a090..56141787 100644 --- a/frida_mode/src/persistent/persistent_x64.c +++ b/frida_mode/src/persistent/persistent_x64.c @@ -173,7 +173,13 @@ static void instrument_exit(GumX86Writer *cw) { static int instrument_afl_persistent_loop_func(void) { int ret = __afl_persistent_loop(persistent_count); - instrument_previous_pc = instrument_hash_zero; + if (instrument_previous_pc_addr == NULL) { + + FATAL("instrument_previous_pc_addr uninitialized"); + + } + + *instrument_previous_pc_addr = instrument_hash_zero; return ret; } diff --git a/frida_mode/src/persistent/persistent_x86.c b/frida_mode/src/persistent/persistent_x86.c index 3fe5891c..76c25334 100644 --- a/frida_mode/src/persistent/persistent_x86.c +++ b/frida_mode/src/persistent/persistent_x86.c @@ -130,7 +130,13 @@ static void instrument_exit(GumX86Writer *cw) { static int instrument_afl_persistent_loop_func(void) { int ret = __afl_persistent_loop(persistent_count); - instrument_previous_pc = instrument_hash_zero; + if (instrument_previous_pc_addr == NULL) { + + FATAL("instrument_previous_pc_addr uninitialized"); + + } + + *instrument_previous_pc_addr = instrument_hash_zero; return ret; } |
