changeset 13250:fc33325c91c1 v8.0.1499

patch 8.0.1499: out-of-memory situation not correctly handled commit https://github.com/vim/vim/commit/4b7e7bed6cb16c8256e6973418701cfb15b30b8e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 11 14:53:30 2018 +0100 patch 8.0.1499: out-of-memory situation not correctly handled Problem: Out-of-memory situation not correctly handled. (Coverity) Solution: Check for NULL value.
author Christian Brabandt <cb@256bit.org>
date Sun, 11 Feb 2018 15:00:06 +0100
parents 75a0fef55558
children 878afef4bf72
files src/terminal.c src/version.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3153,6 +3153,8 @@ f_term_scrape(typval_T *argvars, typval_
 	    bg = cell.bg;
 	}
 	dcell = dict_alloc();
+	if (dcell == NULL)
+	    break;
 	list_append_dict(l, dcell);
 
 	dict_add_nr_str(dcell, "chars", 0, mbs);
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1499,
+/**/
     1498,
 /**/
     1497,