Skip to content

Commit f1bda88

Browse files
authored
regex: bugfix out of bound with gcc "-fsanitize=address" (#9715)
1 parent b8e9f08 commit f1bda88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/regex/regex.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ pub fn (mut re RE) match_base(in_txt &byte, in_txt_len int ) (int,int) {
16901690
}
16911691

16921692
// we're out of text, manage it
1693-
if state.i > in_txt_len || m_state == .new_line {
1693+
if state.i >= in_txt_len || m_state == .new_line {
16941694
//println("Finished text!!")
16951695
src_end = true
16961696

0 commit comments

Comments
 (0)