mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-05 18:19:57 +00:00
save writes every asset into the archive with no size limit, but load refused any asset entry over 1 GiB and any archive expanding past 4 GiB, so a document with large placed files saved normally and then couldn't be reopened. The caps guard against archives whose claimed sizes lie; a stored entry can't lie about its size, since it is its bytes in the archive, already in memory, and all stored entries together can't exceed the archive. A stored entry (every placed PNG, JPEG, GIF and WebP, which save stores as is) now opens at its own size and counts for nothing against the budget; deflated entries (PDF, EPS, SVG) and the JSON keep their caps, so a zip bomb is still refused. The limits are a struct the test can shrink.
Verified locally on a288a87b: fmt, clippy, format tests including stored_assets_open_at_any_size_while_deflated_ones_stay_capped.