0
0
mirror of https://github.com/vim/vim.git synced 2025-11-07 10:17:28 -05:00

patch 9.0.0211: invalid memory access when compiling :lockvar

Problem:    Invalid memory access when compiling :lockvar.
Solution:   Don't read past the end of the line.
This commit is contained in:
Bram Moolenaar
2022-08-14 21:28:32 +01:00
parent c3a483fc3c
commit d1d8f6bacb
3 changed files with 18 additions and 2 deletions

View File

@@ -1737,6 +1737,15 @@ def Test_lockvar()
UnLockIt()
END
v9.CheckScriptFailure(lines, 'E46', 1)
lines =<< trim END
def _()
s:0([], s:0)
lockv
enddef
defcomp
END
v9.CheckScriptFailure(lines, 'E179', 2)
enddef
def Test_substitute_expr()