Patch 8.2.3380
Problem: Crash when using NULL string for funcref().
Solution: Check for NULL argument. (issue #8260)
Files: src/evalfunc.c, src/testdir/test_expr.vim
*** ../vim-8.2.3379/src/evalfunc.c 2021-08-19 21:20:36.705042718 +0200
--- src/evalfunc.c 2021-08-28 12:45:59.265787038 +0200
***************
*** 3932,3937 ****
--- 3932,3942 ----
s = tv_get_string(&argvars[0]);
use_string = TRUE;
}
+ if (s == NULL)
+ {
+ semsg(_(e_invarg2), "NULL");
+ return;
+ }
if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref)
{
*** ../vim-8.2.3379/src/testdir/test_expr.vim 2021-05-25 20:13:56.316778428
+0200
--- src/testdir/test_expr.vim 2021-08-28 12:48:55.405182854 +0200
***************
*** 501,506 ****
--- 501,507 ----
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()
*** ../vim-8.2.3379/src/version.c 2021-08-28 12:30:09.689044139 +0200
--- src/version.c 2021-08-28 12:48:19.049307519 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3380,
/**/
--
"Lisp has all the visual appeal of oatmeal with nail clippings thrown in."
-- Larry Wall
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202108281049.17SAnpTU3045119%40masaka.moolenaar.net.