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

src/terminal.c
src/version.c

index b67cd6ceb4cf7e49798666d479b7aae51c39de44..6b8d35394e498e5266ffe491eabcfb7cf491e23e 100644 (file)
@@ -3153,6 +3153,8 @@ f_term_scrape(typval_T *argvars, typval_T *rettv)
            bg = cell.bg;
        }
        dcell = dict_alloc();
+       if (dcell == NULL)
+           break;
        list_append_dict(l, dcell);
 
        dict_add_nr_str(dcell, "chars", 0, mbs);
index 97d2390d2e78da7d9d503306a83a9b82bad39831..a7cc0e41efe11de1d8ad46374b60b1bdf21df3bd 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1499,
 /**/
     1498,
 /**/