summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-31 15:28:02 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-31 15:28:02 +0200
commit4bbfb0f3cc67c00c8cee4e47283e8d760025219d (patch)
tree458dc0642fa899af644ca8e4987b0d70913234b4
parent8c6173c7d3431dd8bc2b6ffc076ef49512a7e175 (diff)
patch 8.1.1950: using NULL pointer after an out-of-memoryv8.1.1950
Problem: Using NULL pointer after an out-of-memory. Solution: Check for NULL pointer. (Dominique Pelle, closes #4881)
-rw-r--r--src/syntax.c2
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 154b759545..2141beeaf6 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 c406005081..156f075139 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1950,
+/**/
1949,
/**/
1948,