Fuzzbench fuzzer fix (#179)

This commit is contained in:
Dominik Maier 2021-06-16 23:29:51 +02:00 committed by GitHub
parent 21508ee571
commit 0af9c0c862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,12 +99,12 @@ pub extern "C" fn fuzzer_main() {
); );
// For fuzzbench, crashes and finds are inside the same `corpus` directory, in the "queue" and "crashes" subdir. // For fuzzbench, crashes and finds are inside the same `corpus` directory, in the "queue" and "crashes" subdir.
let mut corpus = PathBuf::from(res.value_of("corpus").unwrap().to_string()); let mut out_dir = PathBuf::from(res.value_of("out").unwrap().to_string());
let mut crashes = corpus.clone(); let mut crashes = corpus.clone();
crashes.push("crashes"); crashes.push("crashes");
corpus.push("queue"); out_dir.push("queue");
let seeds = PathBuf::from(res.value_of("seeds").unwrap().to_string()); let in_dir = PathBuf::from(res.value_of("in").unwrap().to_string());
let tokens = res.value_of("tokens").map(PathBuf::from); let tokens = res.value_of("tokens").map(PathBuf::from);
@ -118,7 +118,7 @@ pub extern "C" fn fuzzer_main() {
.expect("Could not parse timeout in milliseconds"), .expect("Could not parse timeout in milliseconds"),
); );
fuzz(corpus, crashes, seeds, tokens, logfile, timeout) fuzz(out_dir, crashes, in_dir, tokens, logfile, timeout)
.expect("An error occurred while fuzzing"); .expect("An error occurred while fuzzing");
} }