changeset 25743:925ffa1eeb08 v8.2.3407

patch 8.2.3407: using uninitialized memory with "let g:['bar'] = 2" Commit: https://github.com/vim/vim/commit/3b318513561b5862944769188ae4af6b70311838 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 6 19:19:45 2021 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Sep 2021 19:30:03 +0200
parents 5399a1d88e0a
children 2d28755ff4a5
files src/dict.c src/version.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dict.c
+++ b/src/dict.c
@@ -229,6 +229,7 @@ dictitem_alloc(char_u *key)
 	STRCPY(di->di_key, key);
 	di->di_flags = DI_FLAGS_ALLOC;
 	di->di_tv.v_lock = 0;
+	di->di_tv.v_type = VAR_UNKNOWN;
     }
     return di;
 }
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3407,
+/**/
     3406,
 /**/
     3405,