mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
Fuzz: Add target for Probe::read
This commit is contained in:
parent
8c9ec0f178
commit
8a7f91582b
2 changed files with 16 additions and 0 deletions
|
@ -89,3 +89,7 @@ path = "fuzz_targets/picture_from_flac_bytes.rs"
|
|||
[[bin]]
|
||||
name = "picture_from_ape_bytes"
|
||||
path = "fuzz_targets/picture_from_ape_bytes.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "probe_read"
|
||||
path = "fuzz_targets/probe_read.rs"
|
||||
|
|
12
fuzz/fuzz_targets/probe_read.rs
Normal file
12
fuzz/fuzz_targets/probe_read.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#![no_main]
|
||||
|
||||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::Probe;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
if let Ok(probe) = Probe::new(&mut Cursor::new(data)).guess_file_type() {
|
||||
let _ = probe.read();
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue