Files
photocraft/crates/codecs/src
Dylan M. Taylor 4a65ae3fb0 codecs: refuse EXR preview attributes larger than their value (#10982)
The exr crate sizes a preview attribute's pixel buffer from its
declared dimensions (up to 4 MiB at once, zero-filled) before it finds
the attribute too short, and in the non-pedantic mode every reader here
uses, it then skips the attribute and continues. A header with
thousands of tiny malformed previews therefore cost thousands of 4 MiB
allocations before any size check ran.

check_previews walks the raw headers and refuses a preview whose
declared width x height x 4 exceeds its value size. It runs before
every header read: read_meta, read_layer, the Cryptomatte listing and
decode_deep_exr.
2026-11-03 06:03:16 -05:00
..
…
…
…
…