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 vim/vim#8367)

22db0d549f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-04-16 09:01:33 +08:00
parent 08121ef69f
commit f4d3e279e8
3 changed files with 12 additions and 2 deletions

View File

@@ -2010,11 +2010,15 @@ 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.
" Nvim doesn't have null functions
" call call(test_null_function(), [])
" Nvim doesn't have null partials
" call call(test_null_partial(), [])
" Nvim doesn't have null functions
" call assert_fails('call test_null_function()()', 'E1192:')
" Nvim doesn't have null partials
" call assert_fails('call test_null_partial()()', 'E117:')
endfunc
func Test_char2nr()