mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
Fuzz: Make all targets build again
None of the fuzz targets have been touched in awhile, so they haven't been compiling for most of the year probably.
This commit is contained in:
parent
d69f1cc2f3
commit
103387fa26
20 changed files with 37 additions and 25 deletions
|
@ -12,7 +12,7 @@ cargo-fuzz = true
|
|||
libfuzzer-sys = "0.4"
|
||||
|
||||
[dependencies.lofty]
|
||||
path = ".."
|
||||
path = "../lofty"
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::aac::AacFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::iff::aiff::AiffFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::ape::ApeFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::FileType::from_buffer(data);
|
||||
let _ = lofty::file::FileType::from_buffer(data);
|
||||
});
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::flac::FlacFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::mp4::Mp4File::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::musepack::MpcFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::mpeg::MpegFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::ogg::OpusFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::Picture::from_ape_bytes("Cover Art (Front)", data);
|
||||
});
|
||||
let _ = lofty::picture::Picture::from_ape_bytes("Cover Art (Front)", data);
|
||||
});
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#![no_main]
|
||||
use lofty::ParsingMode;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::config::ParsingMode;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::Picture::from_flac_bytes(data, true, ParsingMode::Relaxed);
|
||||
let _ = lofty::Picture::from_flac_bytes(data, false, ParsingMode::Relaxed);
|
||||
let _ = lofty::picture::Picture::from_flac_bytes(data, true, ParsingMode::Relaxed);
|
||||
let _ = lofty::picture::Picture::from_flac_bytes(data, false, ParsingMode::Relaxed);
|
||||
});
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::Picture::from_reader(&mut &*data);
|
||||
});
|
||||
let _ = lofty::picture::Picture::from_reader(&mut &*data);
|
||||
});
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::PictureInformation::from_jpeg(data);
|
||||
});
|
||||
let _ = lofty::picture::PictureInformation::from_jpeg(data);
|
||||
});
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::PictureInformation::from_png(data);
|
||||
let _ = lofty::picture::PictureInformation::from_png(data);
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::Probe;
|
||||
use lofty::probe::Probe;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
if let Ok(probe) = Probe::new(&mut Cursor::new(data)).guess_file_type() {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::ogg::SpeexFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::ogg::VorbisFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::iff::wav::WavFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use lofty::{AudioFile, ParseOptions};
|
||||
use lofty::config::ParseOptions;
|
||||
use lofty::file::AudioFile;
|
||||
|
||||
fuzz_target!(|data: Vec<u8>| {
|
||||
let _ = lofty::wavpack::WavPackFile::read_from(&mut Cursor::new(data), ParseOptions::new());
|
||||
|
|
Loading…
Reference in a new issue