From f4d3e279e861dc37dd047c81a0807767a74d251b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 16 Apr 2023 09:01:33 +0800 Subject: 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) https://github.com/vim/vim/commit/22db0d549f64aa3d8a6e366b70eb8d7e66933b82 Co-authored-by: Bram Moolenaar --- test/old/testdir/test_functions.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 3144af83d7..abea3b2538 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -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() -- cgit