From: Bram Moolenaar Date: Sat, 31 Aug 2019 13:28:02 +0000 (+0200) Subject: patch 8.1.1950: using NULL pointer after an out-of-memory X-Git-Tag: v8.1.1950 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4bbfb0f3cc67c00c8cee4e47283e8d760025219d;p=vim patch 8.1.1950: using NULL pointer after an out-of-memory Problem: Using NULL pointer after an out-of-memory. Solution: Check for NULL pointer. (Dominique Pelle, closes #4881) --- diff --git a/src/syntax.c b/src/syntax.c index 154b75954..2141beeaf 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -5222,7 +5222,7 @@ syn_cmd_region( for (item = ITEM_START; item <= ITEM_END; ++item) for (ppp = pat_ptrs[item]; ppp != NULL; ppp = ppp_next) { - if (!success) + if (!success && ppp->pp_synp != NULL) { vim_regfree(ppp->pp_synp->sp_prog); vim_free(ppp->pp_synp->sp_pattern); diff --git a/src/version.c b/src/version.c index c40600508..156f07513 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1950, /**/ 1949, /**/