forked from aniani/vim
patch 8.2.4440: crash with specific regexp pattern and string
Problem: Crash with specific regexp pattern and string. Solution: Stop at the start of the string.
This commit is contained in:
@@ -4615,6 +4615,11 @@ regmatch(
|
||||
if (rex.input == rex.line)
|
||||
{
|
||||
// backup to last char of previous line
|
||||
if (rex.lnum == 0)
|
||||
{
|
||||
status = RA_NOMATCH;
|
||||
break;
|
||||
}
|
||||
--rex.lnum;
|
||||
rex.line = reg_getline(rex.lnum);
|
||||
// Just in case regrepeat() didn't count
|
||||
|
Reference in New Issue
Block a user