diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-11 15:07:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-11 15:07:22 +0100 |
commit | a0221df149aa3773450b3f930299a409dd75bd5b (patch) | |
tree | 3565d5f97f29d9cca54318bdc72fcc1da6bc366e /src/ops.c | |
parent | 0549a1e184d33674f4c2b8fb44ccdf6b9b9808a3 (diff) | |
download | vim-git-a0221df149aa3773450b3f930299a409dd75bd5b.tar.gz |
patch 8.0.1501: out-of-memory situation not correctly handledv8.0.1501
Problem: Out-of-memory situation not correctly handled. (Coverity)
Solution: Check for NULL value.
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |