Files
Odin/tests
Jack Mordaunt 641844dae7 core/encoding/json: size the unquote buffer for replaced invalid UTF-8
unquote_string replaces each byte that is not valid UTF-8 with U+FFFD,
which is three bytes for one, but sized its buffer as len(s) + 2*UTF_MAX:
slack for a single replacement, not for one per invalid byte. A string
holding several ran the write cursor past the end, an out-of-range slice
under bounds checking and a memory-safety bug without it.

Count the invalid bytes in the remainder up front and size for them. The
escape sequences never grow their input, so they need no allowance.
2026-09-25 14:27:40 -03:00
..
2026-08-26 13:02:56 +02:00
2026-07-12 06:17:08 +09:00
2026-09-04 23:23:26 +02:00
2025-12-04 14:11:13 +01:00