Skip to content
Permalink
Browse files
patch 8.2.3883: crash when switching to other regexp engine fails
Problem:    Crash when switching to other regexp engine fails.
Solution:   Check for regprog being NULL.
  • Loading branch information
brammool committed Dec 24, 2021
1 parent fa3b723 commit 5937c7505f444dd896f336fa0119a93a55ebe9a2
Showing with 4 additions and 0 deletions.
  1. +2 −0 src/ex_cmds.c
  2. +2 −0 src/version.c
@@ -4975,6 +4975,8 @@ ex_global(exarg_T *eap)
// a match on this line?
match = vim_regexec_multi(&regmatch, curwin, curbuf, lnum,
(colnr_T)0, NULL, NULL);
if (regmatch.regprog == NULL)
break; // re-compiling regprog failed
if ((type == 'g' && match) || (type == 'v' && !match))
{
ml_setmarked(lnum);
@@ -749,6 +749,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3883,
/**/
3882,
/**/

0 comments on commit 5937c75

Please sign in to comment.