mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
block_chars collected a whole Utf8 string before read checked MAX_CHARS, so an oversized string was fully allocated first. Take at most the remaining allowance plus one, as the mixed-segment arm already does, so read still detects the overflow. Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>