0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.2302: Vim9: using an option value may use uninitialized memory

Problem:    Vim9: using an option value may use uninitialized memory.
Solution:   Clear v_lock. (closes #7620)
This commit is contained in:
Bram Moolenaar
2021-01-05 17:50:28 +01:00
parent 752fc692ac
commit a79925a0a8
3 changed files with 12 additions and 0 deletions

View File

@@ -2426,6 +2426,10 @@ def Test_expr_member_vim9script()
CheckScriptSuccess(lines)
enddef
def SetSomeVar()
b:someVar = &fdm
enddef
def Test_expr7_option()
# option
set ts=11
@@ -2443,6 +2447,11 @@ def Test_expr7_option()
var bval: bool = &tgc
var nval: number = &ts
var sval: string = &path
# check v_lock is cleared (requires using valgrind, doesn't always show)
SetSomeVar()
b:someVar = 0
unlet b:someVar
enddef
def Test_expr7_environment()