]> granicus.if.org Git - vim/commitdiff
patch 8.0.1501: out-of-memory situation not correctly handled v8.0.1501
authorBram Moolenaar <Bram@vim.org>
Sun, 11 Feb 2018 14:07:22 +0000 (15:07 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 11 Feb 2018 14:07:22 +0000 (15:07 +0100)
Problem:    Out-of-memory situation not correctly handled. (Coverity)
Solution:   Check for NULL value.

src/ops.c
src/version.c

index 830de0ba6d7883223c6ca2793f50a53a810d304b..232dc30a4b1e21103ce66b5e987096693cf7d8e8 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -1668,6 +1668,8 @@ yank_do_autocmd(oparg_T *oap, yankreg_T *reg)
     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;
index 4cbfc470910059cb802da625d0a263b0425cb2ff..d96f896ee93608f7a9a65faa8b4a7e288215d45e 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1501,
 /**/
     1500,
 /**/