mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.1.0098: segfault when pattern with \z() is very slow
Problem: Segfault when pattern with \z() is very slow. Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be able to test this. Fix that 'searchhl' resets called_emsg.
This commit is contained in:
@@ -7868,6 +7868,7 @@ next_search_hl(
|
||||
linenr_T l;
|
||||
colnr_T matchcol;
|
||||
long nmatched;
|
||||
int save_called_emsg = called_emsg;
|
||||
|
||||
if (shl->lnum != 0)
|
||||
{
|
||||
@@ -7986,6 +7987,9 @@ next_search_hl(
|
||||
break; /* useful match found */
|
||||
}
|
||||
}
|
||||
|
||||
// Restore called_emsg for assert_fails().
|
||||
called_emsg = save_called_emsg;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user