regex: bugfix out of bound with gcc "-fsanitize=address" (#9715)

pull/9738/head
penguindark 2021-04-15 09:46:49 +02:00 committed by GitHub
parent b8e9f085eb
commit f1bda88964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1690,7 +1690,7 @@ pub fn (mut re RE) match_base(in_txt &byte, in_txt_len int ) (int,int) {
}
// we're out of text, manage it
if state.i > in_txt_len || m_state == .new_line {
if state.i >= in_txt_len || m_state == .new_line {
//println("Finished text!!")
src_end = true