From a8bccf9f25af19b957eced750b06afde0c599652 Mon Sep 17 00:00:00 2001 From: Sharad Khanna Date: Mon, 26 Aug 2024 22:26:36 -0400 Subject: [PATCH] Minimizer fix (#2500) * Clear potentially out of date id * fmt * add mut --- libafl/src/corpus/minimizer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libafl/src/corpus/minimizer.rs b/libafl/src/corpus/minimizer.rs index d4c3aaf381..5dce383bfb 100644 --- a/libafl/src/corpus/minimizer.rs +++ b/libafl/src/corpus/minimizer.rs @@ -238,6 +238,8 @@ where .scheduler_mut() .on_remove(state, id, &Some(removed))?; } + + *state.corpus_mut().current_mut() = None; //we may have removed the current ID from the corpus Ok(()) } else { Err(Error::unknown("Corpus minimization failed; unsat."))