mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
Fuzz: Add targets for Speex and WavPack
This commit is contained in:
parent
4420f92a9f
commit
e62e2c1386
3 changed files with 28 additions and 0 deletions
|
@ -50,10 +50,18 @@ path = "fuzz_targets/opusfile_read_from.rs"
|
|||
name = "vorbisfile_read_from"
|
||||
path = "fuzz_targets/vorbisfile_read_from.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "speexfile_read_from"
|
||||
path = "fuzz_targets/speexfile_read_from.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "wavfile_read_from"
|
||||
path = "fuzz_targets/wavfile_read_from.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "wavpackfile_read_from"
|
||||
path = "fuzz_targets/wavpackfile_read_from.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "pictureinformation_from_jpeg"
|
||||
path = "fuzz_targets/pictureinformation_from_jpeg.rs"
|
||||
|
|
10
fuzz/fuzz_targets/speexfile_read_from.rs
Normal file
10
fuzz/fuzz_targets/speexfile_read_from.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
#![no_main]
|
||||
|
||||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::ogg::SpeexFile::read_from(&mut Cursor::new(data), false);
|
||||
});
|
10
fuzz/fuzz_targets/wavpackfile_read_from.rs
Normal file
10
fuzz/fuzz_targets/wavpackfile_read_from.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
#![no_main]
|
||||
|
||||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::wavpack::WavPackFile::read_from(&mut Cursor::new(data), false);
|
||||
});
|
Loading…
Reference in a new issue