lightcraft/crates/codecs/tests
radialmonster ee9a989834 Codecs: bound thumbnail fallback decodes and WebP metadata allocations
Non-JPEG thumbnail fallbacks decode at source resolution before resizing, so
the output size does not bound memory. ThumbnailOptions gains max_pixels
(default 64 MP, previously about 1 GP via DecodeOptions::fit); larger sources
return Error::TooLarge. Nothing in the workspace calls decode_thumbnail yet.

WebP RIFF chunk lengths are untrusted: set_memory_limit(bytes.len()) stops a
tiny truncated file requesting gigabytes for metadata. In image-webp 0.2.4
the limit applies only to ICC, EXIF and XMP chunks. Fuzz tests cover both;
the roundtrip test only switches to struct update syntax.

Split from a327b98 (T0 thumbnail work), where it was bundled.

Co-authored-by: Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 18:49:59 -04:00
..
bench.rs M1.1: codecs fuzz/corpus/bench tests, thumbnail options, README 2026-09-30 12:26:05 -04:00
corpus.rs M1.1: codecs fuzz/corpus/bench tests, thumbnail options, README 2026-09-30 12:26:05 -04:00
fuzz.rs Codecs: bound thumbnail fallback decodes and WebP metadata allocations 2026-10-07 18:49:59 -04:00
roundtrip.rs Codecs: bound thumbnail fallback decodes and WebP metadata allocations 2026-10-07 18:49:59 -04:00