diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 6db4134628..557d0e1aac 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -6525,7 +6525,8 @@ nfa_regmatch( else result = FAIL; - if (t->state->out->out1->c == NFA_END_COMPOSING) + if (t->state->out->out1 != NULL + && t->state->out->out1->c == NFA_END_COMPOSING) { end = t->state->out->out1; ADD_STATE_IF_MATCH(end); diff --git a/src/testdir/crash/nullptr_regexp_nfa b/src/testdir/crash/nullptr_regexp_nfa new file mode 100644 index 0000000000..6b2edc62a3 Binary files /dev/null and b/src/testdir/crash/nullptr_regexp_nfa differ diff --git a/src/testdir/test_crash.vim b/src/testdir/test_crash.vim index e741a18b4d..bfd04ff10f 100644 --- a/src/testdir/test_crash.vim +++ b/src/testdir/test_crash.vim @@ -228,6 +228,11 @@ func Test_crash1_3() call term_sendkeys(buf, args) call TermWait(buf, 50) + let file = 'crash/nullptr_regexp_nfa' + let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" + let args = printf(cmn_args, vim, file) + call term_sendkeys(buf, args) + call TermWait(buf, 50) " clean up exe buf .. "bw!" diff --git a/src/version.c b/src/version.c index 59bd3fcdcc..5dfb313d25 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 701, /**/ 700, /**/