diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-11 14:53:30 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-11 14:53:30 +0100 |
commit | 4b7e7bed6cb16c8256e6973418701cfb15b30b8e (patch) | |
tree | e9df2dd9cd8cd20ccde9ea6b43ef54a424b9d068 /src/terminal.c | |
parent | a7e18d237f817637815f0de44b08df1e0ca0f4f9 (diff) | |
download | vim-git-4b7e7bed6cb16c8256e6973418701cfb15b30b8e.tar.gz |
patch 8.0.1499: out-of-memory situation not correctly handledv8.0.1499
Problem: Out-of-memory situation not correctly handled. (Coverity)
Solution: Check for NULL value.
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index b67cd6ceb..6b8d35394 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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); |