1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2018-02-11 15:07:22 +01:00
parent 0549a1e184
commit a0221df149
2 changed files with 4 additions and 0 deletions

View File

@@ -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;

View File

@@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1501,
/**/
1500,
/**/