Files
effectcraft/crates
Christopher Linnett d3d23c2f74 fix: bound Image::padded() at the API so no caller can reintroduce the oversized-pad OOM (#2092 review follow-up)
Triage found the pad bound lived only in the DoF callers: Image::padded was
pub with a doc comment asking callers to bound pad, so a future caller could
reintroduce the exact oversized-buffer OOM this PR fixes. The cap now lives
inside padded(): pad is clamped so each output side stays <= MAX_PADDED_SIDE
(30 000, mirroring project limits::MAX_SIZE; raster cannot depend on the
project crate per layering), overflow unreachable by construction, no panic in
any profile. The caller-side padded_size guards stay for reject-on-error UX.

Adds raster regression tests: hostile pad (u32::MAX) clamps to cap with source
intact at the clamped offset (fail-before: pre-fix sized an oversized buffer);
legit pads byte-identical (anti-over-clamp). cargo test -p effectcraft-raster
35/35, -p effectcraft-render 238/238, clippy -D warnings clean, fmt clean.
2026-10-24 11:26:30 +08:00
..
2026-10-18 09:35:35 -04:00
2026-10-18 09:35:35 -04:00
…
2026-10-18 09:35:32 -04:00
2026-10-18 09:35:33 -04:00
…
2026-10-18 09:35:34 -04:00
2026-10-18 09:36:05 -04:00
2026-10-18 09:35:33 -04:00
2026-10-18 11:12:44 -04:00