aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-28 13:27:38 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-28 13:28:18 +0800
commit3afcc48a05693738f613464607286b5684b148cd (patch)
treed7cfe098fea11a019e21c6899a0e8e81e7a8f244 /src
parentbfdf10d87088ee8094cdbab7cef1cb49dc637663 (diff)
downloadrneovim-3afcc48a05693738f613464607286b5684b148cd.tar.gz
rneovim-3afcc48a05693738f613464607286b5684b148cd.tar.bz2
rneovim-3afcc48a05693738f613464607286b5684b148cd.zip
vim-patch:8.2.3407: using uninitialized memory with "let g:['bar'] = 2"
Problem: Using uninitialized memory with "let g:['bar'] = 2". Solution: Initialize v_type of a new dict item. https://github.com/vim/vim/commit/3b318513561b5862944769188ae4af6b70311838 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval/typval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index f45e68acb3..cc6c2b5d90 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -1841,6 +1841,7 @@ dictitem_T *tv_dict_item_alloc_len(const char *const key, const size_t key_len)
di->di_key[key_len] = NUL;
di->di_flags = DI_FLAGS_ALLOC;
di->di_tv.v_lock = VAR_UNLOCKED;
+ di->di_tv.v_type = VAR_UNKNOWN;
return di;
}