mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-27 12:16:54 -06:00
- read_file: verify the opened file is regular and cap the bytes actually taken at the 2 GB limit — a workbook-named symlink to an endless device reported length 0 but streamed forever (finding 22). - write_file: create the temporary file exclusively, so a planted file or symlink at the predictable `book.xlsx.sctmp` path makes the save fail instead of truncating the link's target (finding 25). - write_file: inherit the destination's permissions, so saving an owner-only workbook doesn't become world-readable through the rename (finding 15); new files note restrictive defaults. Tests: exclusive temp creation vs planted symlink, permissions preserved, directory refused on open. Engine: 460 tests pass; clippy clean.