Skip to content

Commit 544c420

Browse files
committed
fix afl max cycles
1 parent cec7fe2 commit 544c420

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bolero-afl/src/bolero-afl-util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ static u64 bolero_afl_max_cycles() {
66
if (!parsed_afl_max_cycles) {
77
u8* max_cycles = getenv("BOLERO_AFL_MAX_CYCLES");
88

9-
if (sscanf(max_cycles, "%llu", &parsed_afl_max_cycles) < 1) {
9+
if (max_cycles < 1 || sscanf(max_cycles, "%llu", &parsed_afl_max_cycles) < 1) {
1010
// set a default
1111
parsed_afl_max_cycles = 100;
1212
}

bolero/src/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub unsafe fn exec(file: &str) {
4242
.filter(|path| path.is_file())
4343
.filter(|path| !path.file_name().unwrap().to_str().unwrap().starts_with('.'))
4444
.map(|path| Test {
45-
name: path.to_str().unwrap().to_owned(),
45+
name: format!("corpus/{}", path.file_stem().unwrap().to_str().unwrap()),
4646
kind: "".into(),
4747
is_ignored: false,
4848
is_bench: false,

0 commit comments

Comments
 (0)