mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 10:03:51 +00:00
Without a composite, PsdBuilder::build made a white placeholder of width x height x depth x channels bytes with vec!, before checking the geometry: a 300000 x 300000 canvas asked for 270 GB, and an overflowing size wrapped. The header is validated first, the size is checked against MAX_DECODED_BYTES (the encoder's own limit), and the buffer is reserved fallibly. Ported from storytold/photocraft#13309.