Files
figcraft/crates
Denis GomesandClaude Opus 5.5 bea214ebb0 M7: decode a clipboard PNG before pasting it
with_pixel_size read only the PNG's header, so a PNG with a whole IHDR and
a cut-off body passed as the one to paste. Since #1724 image.place refuses
it as damaged, and nothing was pasted: the decoded clipboard image, which
paste falls back to for an unreadable PNG, was never tried. The PNG is now
decoded in full before it is accepted, so the paste falls back as it does
for any other unreadable PNG. The zero-size and pixel-count checks run
ahead of that decode, so an image past the limit is refused before it is
decoded.

Raised by CodeRabbit on #1360 after the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 02:37:04 -05:00
..