Files
Nim/lib
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
..
2017-02-20 17:24:19 +02:00
2026-02-21 12:58:25 +01:00
2026-02-26 17:24:58 +01:00
2013-03-16 23:53:07 +01:00
2021-06-03 14:00:53 +02:00
2026-02-21 12:58:25 +01:00