0
0
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:
Bram Moolenaar
2018-06-23 14:21:42 +02:00
parent 5efa0102de
commit bcf9442307
10 changed files with 45 additions and 8 deletions

View File

@@ -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;
}
/*