mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
regex: fix OOB bug discovered through ./v -g -force-bounds-checking vlib/regex/
(fix by @penguindark) (#24960)
This commit is contained in:
parent
66946738fb
commit
93a1989b0b
@ -353,7 +353,10 @@ pub fn (mut re RE) reset() {
|
|||||||
|
|
||||||
// reset state list
|
// reset state list
|
||||||
re.state_list.clear()
|
re.state_list.clear()
|
||||||
re.group_stack.clear()
|
// restore initial state of the stack
|
||||||
|
for mut x in re.group_stack {
|
||||||
|
x = -1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset for search mode fail
|
// reset for search mode fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user