Fix GeneralizedInput::wrapped_as_testcase (#584)

This commit is contained in:
Andrea Fioraldi 2022-03-29 14:56:48 +02:00 committed by GitHub
parent abf1a66028
commit 88a14cbbd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,10 @@ impl Input for GeneralizedInput {
/// An hook executed before being added to the corpus /// An hook executed before being added to the corpus
fn wrapped_as_testcase(&mut self) { fn wrapped_as_testcase(&mut self) {
// remove generalized for inputs generated with bit-level mutations // remove generalized for inputs generated with bit-level mutations
if !self.grimoire_mutated { // and fix bytes for the ones generated by grimoire
if self.grimoire_mutated {
self.bytes = self.generalized_to_bytes();
} else {
self.generalized = None; self.generalized = None;
} }
// restore to allow bit-level mutations // restore to allow bit-level mutations