Skip to content

Commit 3b31851

Browse files
committed
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.
1 parent 3ae5fc9 commit 3b31851

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/dict.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ dictitem_alloc(char_u *key)
229229
STRCPY(di->di_key, key);
230230
di->di_flags = DI_FLAGS_ALLOC;
231231
di->di_tv.v_lock = 0;
232+
di->di_tv.v_type = VAR_UNKNOWN;
232233
}
233234
return di;
234235
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,8 @@ static char *(features[]) =
755755

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3407,
758760
/**/
759761
3406,
760762
/**/

0 commit comments

Comments
 (0)