mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
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.
3b31851356
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user