mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 02:30:15 -06:00
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>