Skip to content

Commit

Permalink
imemory_ondisk: Don't fail write under any circumstances if locking i…
Browse files Browse the repository at this point in the history
…s disabled
  • Loading branch information
s1341 committed Dec 24, 2024
1 parent 6927d61 commit 0193a63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libafl/src/corpus/inmemory_ondisk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,12 @@ impl<I> InMemoryOnDiskCorpus<I> {
fs::rename(&tmpfile_path, &metafile_path)?;
*testcase.metadata_path_mut() = Some(metafile_path);
}

self.store_input_from(testcase)?;

if self.locking {
self.store_input_from(testcase)?;
} else {
let _ = self.store_input_from(testcase);
}
Ok(())
}

Expand Down

0 comments on commit 0193a63

Please sign in to comment.