Merge pull request #37403 from zeertzjq/vim-9.1.0700

vim-patch:9.1.{0700,0701,0702,0703}
This commit is contained in:
zeertzjq
2026-01-15 14:51:13 +08:00
committed by GitHub
4 changed files with 13 additions and 1 deletions

View File

@@ -14799,7 +14799,8 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
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);
}

Binary file not shown.

Binary file not shown.

View File

@@ -226,6 +226,17 @@ func Test_crash1_3()
call term_sendkeys(buf, args)
call TermWait(buf, 150)
let file = 'crash/heap_overflow_glob2regpat'
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)
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!"