Files
craft-libs/crates
dotCooCoo 8a2c27ee2d craft-hdr: refuse buffers past isize::MAX bytes when limits are raised
With a raised max_pixels on wasm32, a picture could pass every check and
then ask vec! for more than isize::MAX bytes for its scan line or its
float picture, which panics with a capacity overflow instead of returning
an error.

- decode checks the byte count of the scan line and of the float picture
  against isize::MAX before allocating either, and returns
  LimitExceeded("pixel count") when one is over.
- Each header line is measured as text after invalid bytes become U+FFFD,
  and a line over isize::MAX bytes is LimitExceeded("header length").
- The resolution line reads its first four tokens without collecting the
  rest.
- The size checks take the bound as a value, and tests check them against
  the 32-bit bound without allocating.
2026-11-13 13:43:35 -08:00
..
…
2026-11-13 01:31:26 -05:00
2026-11-13 07:34:28 +01:00
2026-11-13 07:50:09 -05:00
…
2026-11-13 07:50:09 -05:00
…