Harden the JPEG EXIF scan against malformed input #84

Merged
clawbot merged 1 commits from issue-11-exif-hardening into next2 2026-09-23 02:28:15 +02:00
1 Commits
Author SHA1 Message Date
sneak 3e004ca201 Harden the JPEG EXIF scan against malformed input (closes #11)
check / check (push) Successful in 31s
The segment scan behind `backup-metadata --exif` now checks every
segment length against the bytes that remain and stops on lengths
under 2, so a truncated or corrupt original can neither throw nor loop.
A malformed or unparseable EXIF segment is recorded as
`imageMetadata.exifError`, and a failure to read the original as
`imageMetadataError` in the per-file JSON, instead of the field being
silently left out. Tests use short hand-built byte arrays.

Model: opus-5-5
2026-09-23 00:24:47 +00:00