changeset 13254:88cc06dc1a50 v8.0.1501

patch 8.0.1501: out-of-memory situation not correctly handled commit https://github.com/vim/vim/commit/a0221df149aa3773450b3f930299a409dd75bd5b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 11 15:07:22 2018 +0100 patch 8.0.1501: 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:15:06 +0100
parents c921b8a4dca1
children 4e3d37ba7da8
files src/ops.c src/version.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -1668,6 +1668,8 @@ yank_do_autocmd(oparg_T *oap, yankreg_T 
     v_event = get_vim_var_dict(VV_EVENT);
 
     list = list_alloc();
+    if (list == NULL)
+	return;
     for (n = 0; n < reg->y_size; n++)
 	list_append_string(list, reg->y_array[n], -1);
     list->lv_lock = VAR_FIXED;
--- 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 */
 /**/
+    1501,
+/**/
     1500,
 /**/
     1499,