Files
craft-libs/crates
RWoldbergandClaude Opus 5.5 ab2bcccf84 crw: refuse an entropy stream cut short
When the entropy stream ends before the frame does, the stream-end rule gives the
remaining samples their predictor values. That was silent: a raw-data record cut
short inside an intact CIFF heap decoded as a smeared image instead of an error.

`decode` now counts those samples (`Image::stream_end_fill`) and returns
`Error::Corrupt` when there are more than `Limits::max_stream_end_fill` (default
64, one block). `Limits` is non-exhaustive, so the field is additive. The frozen
format is unchanged: a fill within the limit decodes exactly as before.

Every real file measured fills none: 1,318 files of all seven verified bodies
(1,308 EOS D60), whose last samples come from an end-of-block code. The CC0 sample
test still decodes all ten files exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:22:59 -06:00
..
…
…
…
…
…