about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-09-14 16:02:21 +0200
committerGitHub <noreply@github.com>2024-09-14 16:02:21 +0200
commit8531928fa4333eddd958899b6ccb714db33573f6 (patch)
tree315828e77369e94a2c9f9a9a86a06693674e7635 /src/afl-fuzz.c
parent804c98a1e893b40209b377d31b55efec4c7c824b (diff)
parent1d6cd5dd199e0c745aaca05b465286bf63d5ebc2 (diff)
downloadafl++-8531928fa4333eddd958899b6ccb714db33573f6.tar.gz
Merge pull request #2207 from schumilo/dev
fix AFL_AUTORESUME=1 for Nyx mode
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 5ab8d7e9..a2fd4b76 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -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!");