1
0
forked from aniani/vim

patch 8.2.2977: crash when using a null function reference

Problem:    Crash when using a null function reference. (Naohiro Ono)
Solution:   Check for an invalid function name. (closes #8367)
This commit is contained in:
Bram Moolenaar
2021-06-12 12:16:55 +02:00
parent 8de901e1f1
commit 22db0d549f
4 changed files with 15 additions and 1 deletions

View File

@@ -2174,9 +2174,11 @@ func Test_call()
call assert_fails("call call('Mylen', [], 0)", 'E715:')
call assert_fails('call foo', 'E107:')
" This once caused a crash.
" These once caused a crash.
call call(test_null_function(), [])
call call(test_null_partial(), [])
call assert_fails('call test_null_function()()', 'E1192:')
call assert_fails('call test_null_partial()()', 'E117:')
endfunc
func Test_char2nr()