mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-15 07:42:42 +00:00
Paste read a file copied in a file manager whole with std::fs::read, with no size limit. It now checks the opened file's size against MAX_BYTES (64 MiB, the limit the Wayland clipboard reads already use, now shared) before reading its first bytes, and reads the rest with a bounded reader, so a file that grows after the check is read to at most one byte past the limit and skipped. A skipped file lets the next copied file that is art paste, as an unreadable one does.