Files
Odin/tests/core
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-07-13 22:56:01 -07:00
2025-10-28 14:53:26 +00:00
2026-07-14 16:28:29 +02:00
2026-08-22 21:50:07 +02:00
2026-08-05 12:28:39 +02:00
2026-08-12 13:59:51 +02:00
2026-02-14 12:52:51 +01:00
2026-08-16 15:10:01 +02:00
2026-08-12 14:09:07 +02:00
2026-07-01 11:49:11 +02:00
2026-04-13 14:51:51 +02:00
2026-05-01 13:41:13 +07:00
2026-02-19 02:32:00 +01:00
2025-09-09 17:13:21 +02:00
2026-07-13 22:56:01 -07:00
2026-08-23 21:49:39 +02:00
2026-08-03 02:32:09 +03:00