mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
Tests/Fuzz: Fix arguments to Picture::from_flac_bytes
This commit is contained in:
parent
9ae927ceb0
commit
aea857cec2
2 changed files with 7 additions and 5 deletions
|
@ -1,7 +1,9 @@
|
|||
#![no_main]
|
||||
use lofty::ParsingMode;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = lofty::Picture::from_flac_bytes(data, true);
|
||||
let _ = lofty::Picture::from_flac_bytes(data, false);
|
||||
let _ = lofty::Picture::from_flac_bytes(data, true, ParsingMode::Relaxed);
|
||||
let _ = lofty::Picture::from_flac_bytes(data, false, ParsingMode::Relaxed);
|
||||
});
|
|
@ -1,5 +1,5 @@
|
|||
use lofty::id3::v2::{AttachedPictureFrame, Id3v2Version};
|
||||
use lofty::{Picture, PictureInformation, PictureType, TextEncoding};
|
||||
use lofty::{ParsingMode, Picture, PictureInformation, PictureType, TextEncoding};
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
@ -96,7 +96,7 @@ fn as_ape_bytes() {
|
|||
fn flac_metadata_block_picture() {
|
||||
let buf = get_buf("tests/picture/assets/png_640x628.vorbis");
|
||||
|
||||
let (pic, _) = Picture::from_flac_bytes(&buf, true).unwrap();
|
||||
let (pic, _) = Picture::from_flac_bytes(&buf, true, ParsingMode::Strict).unwrap();
|
||||
|
||||
assert_eq!(create_original_picture(), pic);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue