From 3e7322e395a2ce692cae0949fb6202d34a020a35 Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Tue, 28 Feb 2023 23:41:17 +0900 Subject: [PATCH] Remove unnecessary check in calibration stage (#1111) * save * fix --- libafl/src/stages/calibrate.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libafl/src/stages/calibrate.rs b/libafl/src/stages/calibrate.rs index 6a7300f5ff..fe1a001eb9 100644 --- a/libafl/src/stages/calibrate.rs +++ b/libafl/src/stages/calibrate.rs @@ -104,16 +104,11 @@ where corpus_idx: CorpusId, ) -> Result<(), Error> { // Run this stage only once for each corpus entry and only if we haven't already inspected it - if state.corpus().get(corpus_idx)?.borrow().fuzz_level() > 0 - || state - .corpus() - .get(corpus_idx)? - .borrow() - .metadata() - .get::() - .map_or(false, |meta| meta.bitmap_size() != 0) { - return Ok(()); + let corpus = state.corpus().get(corpus_idx)?.borrow(); + if corpus.fuzz_level() > 0 { + return Ok(()); + } } let mut iter = self.stage_max;