1
0
forked from aniani/vim

patch 8.2.3380: crash when using NULL string for funcref()

Problem:    Crash when using NULL string for funcref().
Solution:   Check for NULL argument. (issue #8260)
This commit is contained in:
Bram Moolenaar
2021-08-28 12:49:27 +02:00
parent 271906bc06
commit 60b6e6f6cc
3 changed files with 8 additions and 0 deletions

View File

@@ -501,6 +501,7 @@ func Test_funcref()
let OneByRef = funcref("One", repeat(["foo"], 20))
call assert_fails('let OneByRef = funcref("One", repeat(["foo"], 21))', 'E118:')
call assert_fails('echo function("min") =~ function("min")', 'E694:')
call assert_fails('echo test_null_function()->funcref()', 'E475: Invalid argument: NULL')
endfunc
func Test_setmatches()