mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 23:24:24 +00:00
14 lines
444 B
Rust
14 lines
444 B
Rust
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use craft_image_codecs::{decode_as_with, decode_webp_frames, DecodeOptions, Format, Limits};
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
let opts = DecodeOptions {
|
|
limits: Limits { max_width: 4096, max_height: 4096, max_pixels: 1 << 22, max_alloc: 256 << 20 },
|
|
..Default::default()
|
|
};
|
|
let _ = decode_as_with(Format::WebP, data, &opts);
|
|
let _ = decode_webp_frames(data, &opts);
|
|
});
|