mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
Offsets and counts stored in a profile reach u32::MAX, which is usize::MAX on 32-bit targets such as wasm32. Several places added to or multiplied them before any bounds check, so a malformed profile could panic (overflow checks on) or read from a wrapped offset (checks off). - curv: reject an over-long count before computing the element length. - mAB/mBA: the matrix and CLUT read through one bounds-checked slice at the stored offset instead of adding to the offset. - mluc: the record offset is computed with checked arithmetic. - XYZ: one bounds-checked slice instead of off + 4 and off + 8. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>