1
0
forked from aniani/vim

patch 8.2.0033: crash when make_extmatch() runs out of memory

Problem:    Crash when make_extmatch() runs out of memory.
Solution:   Check for NULL. (Dominique Pelle, closs #5392)
This commit is contained in:
Bram Moolenaar 2019-12-22 19:40:40 +01:00
parent 7c2a2f869b
commit 7c77b34967
3 changed files with 6 additions and 0 deletions

View File

@ -4568,6 +4568,8 @@ regtry(
cleanup_zsubexpr();
re_extmatch_out = make_extmatch();
if (re_extmatch_out == NULL)
return 0;
for (i = 0; i < NSUBEXP; i++)
{
if (REG_MULTI)

View File

@ -7070,6 +7070,8 @@ nfa_regtry(
{
cleanup_zsubexpr();
re_extmatch_out = make_extmatch();
if (re_extmatch_out == NULL)
return 0;
// Loop over \z1, \z2, etc. There is no \z0.
for (i = 1; i < subs.synt.in_use; i++)
{

View File

@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
33,
/**/
32,
/**/