about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-04-11 09:40:28 +0200
committervanhauser-thc <vh@thc.org>2024-04-11 09:40:28 +0200
commitb08df87f5ce2b5cc32d68d7785eab84795370ec2 (patch)
treedee843eabd4a7073efe378fbb8ef6f74035e9367 /src
parent72226d6f89ef47c1e81115eccff887cbf4ec585f (diff)
downloadafl++-b08df87f5ce2b5cc32d68d7785eab84795370ec2.tar.gz
fix syncing with custom mutator
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-run.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c
index 1c6ce56a..edcddc8e 100644
--- a/src/afl-fuzz-run.c
+++ b/src/afl-fuzz-run.c
@@ -822,7 +822,7 @@ void sync_fuzzers(afl_state_t *afl) {
         /* See what happens. We rely on save_if_interesting() to catch major
            errors and save the test case. */
 
-        (void)write_to_testcase(afl, (void **)&mem, st.st_size, 1);
+        u32 new_len = write_to_testcase(afl, (void **)&mem, st.st_size, 1);
 
         fault = fuzz_run_target(afl, &afl->fsrv, afl->fsrv.exec_tmout);
 
@@ -830,7 +830,7 @@ void sync_fuzzers(afl_state_t *afl) {
 
         afl->syncing_party = sd_ent->d_name;
         afl->queued_imported +=
-            save_if_interesting(afl, mem, st.st_size, fault);
+            save_if_interesting(afl, mem, new_len, fault);
         afl->syncing_party = 0;
 
         munmap(mem, st.st_size);