diff options
author | van Hauser <vh@thc.org> | 2024-09-24 11:57:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 11:57:36 +0300 |
commit | d21fb1a558b25c4f46692fa999c0028dfe0eecc0 (patch) | |
tree | c503336edd8dc0ee4f8385c0fbc91a5e818ffcfb /src/afl-fuzz.c | |
parent | 75d8c47a6b8ae94cd7ded2f0574e4d35a2021ab7 (diff) | |
parent | 2e6c74f9b9d3bc70ef9474eb08592b9cd151d3c7 (diff) | |
download | afl++-d21fb1a558b25c4f46692fa999c0028dfe0eecc0.tar.gz |
Merge pull request #2214 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r-- | src/afl-fuzz.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 726a2260..a2fd4b76 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -1505,7 +1505,7 @@ int main(int argc, char **argv_orig, char **envp) { #ifdef __linux__ if (afl->fsrv.nyx_mode) { - OKF("AFL++ Nyx mode is enabled (developed and mainted by Sergej Schumilo)"); + OKF("AFL++ Nyx mode is enabled (developed and maintained by Sergej Schumilo)"); OKF("Nyx is open source, get it at https://github.com/Nyx-Fuzz"); } @@ -2225,9 +2225,24 @@ int main(int argc, char **argv_orig, char **envp) { if (afl->in_place_resume && !afl->afl_env.afl_no_fastresume) { +#ifdef __linux__ + u64 target_hash = 0; + if (afl->fsrv.nyx_mode) { + nyx_load_target_hash(&afl->fsrv); + target_hash = afl->fsrv.nyx_target_hash64; + } + else { + target_hash = get_binary_hash(afl->fsrv.target_path); + } +#else u64 target_hash = get_binary_hash(afl->fsrv.target_path); +#endif - if (!target_hash || prev_target_hash != target_hash) { + if ((!target_hash || prev_target_hash != target_hash) +#ifdef __linux__ + || (afl->fsrv.nyx_mode && target_hash == 0) +#endif + ) { ACTF("Target binary is different, cannot perform FAST RESUME!"); |