0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 9.1.0688: Vim9: dereferences NULL pointer in check_type_is_value()

Problem:  Vim9: dereferences NULL pointer in check_type_is_value()
          (Suyue Guo)
Solution: Verify that the pointer is not Null

fixes: #15540
closes: #15545

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-08-22 21:25:18 +02:00
parent dabf07e458
commit 25618fc9ea
3 changed files with 14 additions and 2 deletions

View File

@@ -2036,6 +2036,14 @@ def Test_no_space_after_command()
v9.CheckDefExecAndScriptFailure(lines, 'E486:', 1)
enddef
def Test_lambda_crash()
# This used to crash Vim
var lines =<< trim END
vim9 () => super => {
END
v9.CheckScriptFailureList(lines, ["E1356:", "E1405:"])
enddef
" Test for the 'previewpopup' option
def Test_previewpopup()
set previewpopup=height:10,width:60
@@ -2044,6 +2052,7 @@ def Test_previewpopup()
assert_notequal(id, 0)
assert_match('Xppfile', popup_getoptions(id).title)
popup_clear()
bw Xppfile
set previewpopup&
enddef