0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.1.2147: crash when allocating memory fails

Problem:    Crash when allocating memory fails. (Zu-Ming Jiang)
Solution:   Check that 'spellcapcheck' is not NULL. (closes #5048)
This commit is contained in:
Bram Moolenaar
2019-10-13 19:49:26 +02:00
parent 1e7b52ad8a
commit 53efb18530
2 changed files with 3 additions and 1 deletions

View File

@@ -4367,7 +4367,7 @@ compile_cap_prog(synblock_T *synblock)
regprog_T *rp = synblock->b_cap_prog; regprog_T *rp = synblock->b_cap_prog;
char_u *re; char_u *re;
if (*synblock->b_p_spc == NUL) if (synblock->b_p_spc == NULL || *synblock->b_p_spc == NUL)
synblock->b_cap_prog = NULL; synblock->b_cap_prog = NULL;
else else
{ {

View File

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