lightcraft/crates/raw
Claude cb0e0cb2e5
Follow-up to #393: the embedded-JPEG scan shares a work budget
scan_for_jpeg walks every JPEG-like start in a container it can't parse;
each walk runs through the marker segments that follow (up to 4096) and
their entropy data. A crafted CRW/MRW/X3F (or unsupported TIFF raw) of
fake starts one after another makes every walk cover most of the file:
quadratic, about a minute for 40 MB, on the import's probe thread. The
walks now report how far they read and share a budget of eight times the
file's size (at least 1 MiB); real files' candidates fail within a few
bytes or are the preview itself. Test: 200,000 fake starts, 0.15 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01912WaK6Rmew3wxZuPyX7E8
2026-10-08 22:03:26 +00:00
..
examples M11.3: Panasonic RW2 decoding (packed 12/14-bit) 2026-10-01 00:11:34 -04:00
src Follow-up to #393: the embedded-JPEG scan shares a work budget 2026-10-08 22:03:26 +00:00
tests LR-IMP-FORMATS: TIFF raws with a thumbnail-only IFD0 import as preview only, not as a tiny image 2026-10-08 16:31:49 -04:00
Cargo.toml M11.4: harden RAF validation and camera profile fallback 2026-10-08 11:23:55 +02:00