From 950b90abcd94adc9a81aff24e413529d94445d7f Mon Sep 17 00:00:00 2001 From: Kuang-che Wu Date: Sun, 30 Mar 2025 16:04:01 +0000 Subject: [PATCH] avoid import already imported foreign corpus If no new foreign cases, mtime_max is 0 and this incorrectly reset last import mtime. --- src/afl-fuzz-init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index d8e7169d..f31511ff 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -668,7 +668,12 @@ void read_foreign_testcases(afl_state_t *afl, int first) { } - afl->foreign_syncs[iter].mtime = mtime_max; + if (mtime_max > afl->foreign_syncs[iter].mtime) { + + afl->foreign_syncs[iter].mtime = mtime_max; + + } + free(nl); /* not tracked */ }