forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

decode_with_limits.rs17 lines, 520 bytesHistoryRawDownload
1#![no_main]
2
3use ec_image::Limits;
4use libfuzzer_sys::fuzz_target;
5
6// Small limits: 4096x4096 pixels, 64 MiB per buffer, 128 MiB across one call. Under these a
7// hostile header is refused before it sizes anything, and every path that multiplies a count by
8// a size still gets exercised against a real budget.
9const LIMITS: Limits = Limits {
10 max_pixels: 4096 * 4096,
11 max_alloc: 1 << 26,
12 max_total_alloc: 1 << 27,
13};
14
15fuzz_target!(|data: &[u8]| {
16 let _ = ec_image::decode_with_limits(data, LIMITS);
17});