Files
gridcraft/crates/engine/src/cmd
Dylan M. Taylor ff9f4b8ace Find and Replace: bound the text a replacement builds (#3194)
* Find and Replace: bound the text a replacement builds

Each occurrence copied the whole replacement string, so a cell full of
short matches and a long replacement expanded tens of kilobytes of
input into about a gigabyte, in both the case-sensitive and the
case-insensitive paths.

Replacement now builds the new text only while it stays within
Excel's 32,767 characters per cell (counted as UTF-8 bytes, 4 each at
most) and within 256 MiB for the whole command, checking before each
copy. Past either limit the command fails and changes nothing.

* address review: enforce the 32,767-character limit on replacements and borrow the replacement text
2026-11-11 04:02:22 -05:00
..
2026-11-02 05:08:06 -05:00
…
…
2026-11-02 05:08:06 -05:00
…
…
…