ensure fuzz-length u32
This commit is contained in:
parent
dae46ea26b
commit
6d1d7482ee
@ -304,7 +304,7 @@ let run_client = |state: Option<_>, mut mgr, _core_id| {
|
||||
// Note: I could not find a difference between write_mem and write_phys_mem for my usecase
|
||||
qemu.write_mem(harness_input_addr, bytes);
|
||||
if let Some(s) = harness_input_length_ptr {
|
||||
qemu.write_mem(s, &len.to_le_bytes());
|
||||
qemu.write_mem(s, &(len as u32).to_le_bytes());
|
||||
}
|
||||
|
||||
qemu.run();
|
||||
@ -484,7 +484,7 @@ let run_client = |state: Option<_>, mut mgr, _core_id| {
|
||||
Ok(x) => x,
|
||||
Err(_) => {
|
||||
println!("Interpreting input file as raw input");
|
||||
setup_interrupt_inputs(MultipartInput::from([("bytes",BytesInput::new(input.as_os_str().as_encoded_bytes().to_vec()))]), &interrupt_config, None)
|
||||
setup_interrupt_inputs(MultipartInput::from([("bytes",BytesInput::new(fs::read(input).expect("Can not read input file")))]), &interrupt_config, None)
|
||||
}
|
||||
};
|
||||
fuzzer.evaluate_input(&mut state, &mut executor, &mut mgr, show_input)
|
||||
|
Loading…
x
Reference in New Issue
Block a user