Files
Nim/tests/stdlib
Raka Hourianto 5eb96d40ee nre: fix replacement string parser OOB access, numeric refs, and unterminated named refs (#25560)
1. A trailing `$` at the end of a replacement string could read out of
bounds via `how[i + 1]`; this now raises `ValueError` instead.

2. Numeric capture parsing used `id += (id * 10) + digit` instead of `id
= (id * 10) + digit`, so multi-digit refs were parsed incorrectly (e.g.
`$12` resolved as capture 13 instead of 12).

4. Unterminated named replacement syntax (e.g. `${foo)` is now rejected
with ValueError instead of being accepted and parsed inconsistently.

Found and fixed by GPT 5.3 Codex.

(cherry picked from commit 9b2b286baf)
2026-03-02 10:55:53 +01:00
..
2022-09-23 13:05:05 +02:00
2020-11-13 16:15:13 +08:00
2025-11-15 12:26:15 +01:00
2021-01-07 19:16:26 +01:00
2022-09-29 12:16:42 +02:00
2022-10-22 13:42:46 +02:00
2025-11-15 12:26:15 +01:00
2021-10-24 11:51:57 +02:00
2023-06-09 16:03:28 +02:00
2020-10-18 12:57:13 -04:00
2025-01-14 12:15:09 +01:00
2025-09-10 07:58:50 +02:00
2023-06-08 08:02:57 +02:00