diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index c4f8591b..8b661540 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -12,7 +12,7 @@ cargo-fuzz = true libfuzzer-sys = "0.4" [dependencies.lofty] -path = ".." +path = "../lofty" # Prevent this from interfering with workspaces [workspace] diff --git a/fuzz/fuzz_targets/aacfile_read_from.rs b/fuzz/fuzz_targets/aacfile_read_from.rs index 026635bf..a12b230b 100644 --- a/fuzz/fuzz_targets/aacfile_read_from.rs +++ b/fuzz/fuzz_targets/aacfile_read_from.rs @@ -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| { let _ = lofty::aac::AacFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/aifffile_read_from.rs b/fuzz/fuzz_targets/aifffile_read_from.rs index 4cefeacc..92915ef1 100644 --- a/fuzz/fuzz_targets/aifffile_read_from.rs +++ b/fuzz/fuzz_targets/aifffile_read_from.rs @@ -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| { let _ = lofty::iff::aiff::AiffFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/apefile_read_from.rs b/fuzz/fuzz_targets/apefile_read_from.rs index 4bc8a5de..d03395ff 100644 --- a/fuzz/fuzz_targets/apefile_read_from.rs +++ b/fuzz/fuzz_targets/apefile_read_from.rs @@ -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| { let _ = lofty::ape::ApeFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/filetype_from_buffer.rs b/fuzz/fuzz_targets/filetype_from_buffer.rs index 891e9f88..76929b90 100644 --- a/fuzz/fuzz_targets/filetype_from_buffer.rs +++ b/fuzz/fuzz_targets/filetype_from_buffer.rs @@ -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); }); diff --git a/fuzz/fuzz_targets/flacfile_read_from.rs b/fuzz/fuzz_targets/flacfile_read_from.rs index cf68f934..086b018c 100644 --- a/fuzz/fuzz_targets/flacfile_read_from.rs +++ b/fuzz/fuzz_targets/flacfile_read_from.rs @@ -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| { let _ = lofty::flac::FlacFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/mp4file_read_from.rs b/fuzz/fuzz_targets/mp4file_read_from.rs index 4b1d9f73..004917e2 100644 --- a/fuzz/fuzz_targets/mp4file_read_from.rs +++ b/fuzz/fuzz_targets/mp4file_read_from.rs @@ -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| { let _ = lofty::mp4::Mp4File::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/mpcfile_read_from.rs b/fuzz/fuzz_targets/mpcfile_read_from.rs index 47b883f1..434398e9 100644 --- a/fuzz/fuzz_targets/mpcfile_read_from.rs +++ b/fuzz/fuzz_targets/mpcfile_read_from.rs @@ -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| { let _ = lofty::musepack::MpcFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/mpegfile_read_from.rs b/fuzz/fuzz_targets/mpegfile_read_from.rs index c19032df..1cfc0ff0 100644 --- a/fuzz/fuzz_targets/mpegfile_read_from.rs +++ b/fuzz/fuzz_targets/mpegfile_read_from.rs @@ -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| { let _ = lofty::mpeg::MpegFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/opusfile_read_from.rs b/fuzz/fuzz_targets/opusfile_read_from.rs index 1ea8350f..6c5d6664 100644 --- a/fuzz/fuzz_targets/opusfile_read_from.rs +++ b/fuzz/fuzz_targets/opusfile_read_from.rs @@ -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| { let _ = lofty::ogg::OpusFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/picture_from_ape_bytes.rs b/fuzz/fuzz_targets/picture_from_ape_bytes.rs index b4ed9a8a..587ebdc4 100644 --- a/fuzz/fuzz_targets/picture_from_ape_bytes.rs +++ b/fuzz/fuzz_targets/picture_from_ape_bytes.rs @@ -2,5 +2,5 @@ use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { - let _ = lofty::Picture::from_ape_bytes("Cover Art (Front)", data); -}); \ No newline at end of file + let _ = lofty::picture::Picture::from_ape_bytes("Cover Art (Front)", data); +}); diff --git a/fuzz/fuzz_targets/picture_from_flac_bytes.rs b/fuzz/fuzz_targets/picture_from_flac_bytes.rs index e406e885..e99d4090 100644 --- a/fuzz/fuzz_targets/picture_from_flac_bytes.rs +++ b/fuzz/fuzz_targets/picture_from_flac_bytes.rs @@ -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); }); diff --git a/fuzz/fuzz_targets/picture_from_reader.rs b/fuzz/fuzz_targets/picture_from_reader.rs index 2ccd1b09..8d4f6a2c 100644 --- a/fuzz/fuzz_targets/picture_from_reader.rs +++ b/fuzz/fuzz_targets/picture_from_reader.rs @@ -2,5 +2,5 @@ use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { - let _ = lofty::Picture::from_reader(&mut &*data); -}); \ No newline at end of file + let _ = lofty::picture::Picture::from_reader(&mut &*data); +}); diff --git a/fuzz/fuzz_targets/pictureinformation_from_jpeg.rs b/fuzz/fuzz_targets/pictureinformation_from_jpeg.rs index 8de02ca8..6fcae508 100644 --- a/fuzz/fuzz_targets/pictureinformation_from_jpeg.rs +++ b/fuzz/fuzz_targets/pictureinformation_from_jpeg.rs @@ -2,5 +2,5 @@ use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { - let _ = lofty::PictureInformation::from_jpeg(data); -}); \ No newline at end of file + let _ = lofty::picture::PictureInformation::from_jpeg(data); +}); diff --git a/fuzz/fuzz_targets/pictureinformation_from_png.rs b/fuzz/fuzz_targets/pictureinformation_from_png.rs index 775f967c..a9027bce 100644 --- a/fuzz/fuzz_targets/pictureinformation_from_png.rs +++ b/fuzz/fuzz_targets/pictureinformation_from_png.rs @@ -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); }); diff --git a/fuzz/fuzz_targets/probe_read.rs b/fuzz/fuzz_targets/probe_read.rs index f0861d64..71424c6d 100644 --- a/fuzz/fuzz_targets/probe_read.rs +++ b/fuzz/fuzz_targets/probe_read.rs @@ -3,7 +3,7 @@ use std::io::Cursor; use libfuzzer_sys::fuzz_target; -use lofty::Probe; +use lofty::probe::Probe; fuzz_target!(|data: Vec| { if let Ok(probe) = Probe::new(&mut Cursor::new(data)).guess_file_type() { diff --git a/fuzz/fuzz_targets/speexfile_read_from.rs b/fuzz/fuzz_targets/speexfile_read_from.rs index 1a9c59b1..e26af64f 100644 --- a/fuzz/fuzz_targets/speexfile_read_from.rs +++ b/fuzz/fuzz_targets/speexfile_read_from.rs @@ -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| { let _ = lofty::ogg::SpeexFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/vorbisfile_read_from.rs b/fuzz/fuzz_targets/vorbisfile_read_from.rs index 4e329dd0..b4fe5824 100644 --- a/fuzz/fuzz_targets/vorbisfile_read_from.rs +++ b/fuzz/fuzz_targets/vorbisfile_read_from.rs @@ -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| { let _ = lofty::ogg::VorbisFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/wavfile_read_from.rs b/fuzz/fuzz_targets/wavfile_read_from.rs index 6f575749..9a1c2578 100644 --- a/fuzz/fuzz_targets/wavfile_read_from.rs +++ b/fuzz/fuzz_targets/wavfile_read_from.rs @@ -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| { let _ = lofty::iff::wav::WavFile::read_from(&mut Cursor::new(data), ParseOptions::new()); diff --git a/fuzz/fuzz_targets/wavpackfile_read_from.rs b/fuzz/fuzz_targets/wavpackfile_read_from.rs index df05c0ae..43f9a7dc 100644 --- a/fuzz/fuzz_targets/wavpackfile_read_from.rs +++ b/fuzz/fuzz_targets/wavpackfile_read_from.rs @@ -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| { let _ = lofty::wavpack::WavPackFile::read_from(&mut Cursor::new(data), ParseOptions::new());