From 719a3c0f07a8b4a665b59782a482fed78a5e0d0b Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Tue, 7 Jan 2025 15:07:46 +0100 Subject: [PATCH] Continue loading inputs even if some fail to deserialize (#2820) * Continue loading inputs even if some fail to deserialize * fmt * fix --- libafl/src/state/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libafl/src/state/mod.rs b/libafl/src/state/mod.rs index 35ffedba68..3e41cd65a4 100644 --- a/libafl/src/state/mod.rs +++ b/libafl/src/state/mod.rs @@ -752,8 +752,14 @@ where EM: EventFirer, Z: Evaluator, { - log::info!("Loading file {:?} ...", &path); - let input = (config.loader)(fuzzer, self, path)?; + log::info!("Loading file {path:?} ..."); + let input = match (config.loader)(fuzzer, self, path) { + Ok(input) => input, + Err(err) => { + log::error!("Skipping input that we could not load from {path:?}: {err:?}"); + return Ok(ExecuteInputResult::None); + } + }; if config.forced { let _: CorpusId = fuzzer.add_input(self, executor, manager, input)?; Ok(ExecuteInputResult::Corpus)