From 53efb18530cc3940d7af2ea338947783ea5495ed Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 13 Oct 2019 19:49:26 +0200 Subject: 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) --- src/spell.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spell.c b/src/spell.c index 607bb392e..04e4af601 100644 --- a/src/spell.c +++ b/src/spell.c @@ -4367,7 +4367,7 @@ compile_cap_prog(synblock_T *synblock) regprog_T *rp = synblock->b_cap_prog; 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; else { diff --git a/src/version.c b/src/version.c index a6a9439fe..3dc64cc08 100644 --- a/src/version.c +++ b/src/version.c @@ -753,6 +753,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2147, /**/ 2146, /**/ -- cgit v1.2.1