mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-11 13:02:25 +00:00
Both readers kept every REP line: an .aff with hundreds of thousands of entries, or megabyte-long patterns and replacements, made each suggestion round hang and allocate hundreds of MB. push_rep keeps at most 4096 entries, drops patterns longer than MAX_LETTERS letters (no suggester takes a longer word, so they never match) and replacements longer than MAX_WORD_BYTES. Ported from storytold/wordcraft#4632, which can't land now that proofing lives here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>