From f1bda88964db059587781eb4afb1847e794cea23 Mon Sep 17 00:00:00 2001 From: penguindark <57967770+penguindark@users.noreply.github.com> Date: Thu, 15 Apr 2021 09:46:49 +0200 Subject: [PATCH] regex: bugfix out of bound with gcc "-fsanitize=address" (#9715) --- vlib/regex/regex.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/regex/regex.v b/vlib/regex/regex.v index 6dcd6d6232..fad98841d9 100644 --- a/vlib/regex/regex.v +++ b/vlib/regex/regex.v @@ -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