Patch 8.2.3134
Problem: Crash when using typename() on a function reference. (Naohiro Ono)
Solution: Initialize pointer to NULL. (closes #8531)
Files: src/vim9type.c, src/testdir/test_vim9_builtin.vim
*** ../vim-8.2.3133/src/vim9type.c 2021-07-04 20:20:48.165400896 +0200
--- src/vim9type.c 2021-07-09 19:53:00.950351912 +0200
***************
*** 1166,1172 ****
for (i = 0; i < type->tt_argcount; ++i)
{
! char *arg_free;
char *arg_type;
int len;
--- 1166,1172 ----
for (i = 0; i < type->tt_argcount; ++i)
{
! char *arg_free = NULL;
char *arg_type;
int len;
*** ../vim-8.2.3133/src/testdir/test_vim9_builtin.vim 2021-07-08
20:57:14.542398410 +0200
--- src/testdir/test_vim9_builtin.vim 2021-07-09 19:51:50.954463740 +0200
***************
*** 1943,1948 ****
--- 1943,1954 ----
CheckDefFailure(['echo tr("a", "a", 1)'], 'E1013: Argument 3: type
mismatch, expected string but got number')
enddef
+ def Test_typename()
+ if has('float')
+ assert_equal('func([unknown], [unknown]): float',
typename(function('pow')))
+ endif
+ enddef
+
def Test_undofile()
CheckDefFailure(['undofile(10)'], 'E1013: Argument 1: type mismatch,
expected string but got number')
assert_equal('.abc.un~', fnamemodify(undofile('abc'), ':t'))
*** ../vim-8.2.3133/src/version.c 2021-07-09 19:17:52.238004722 +0200
--- src/version.c 2021-07-09 19:50:05.950632308 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3134,
/**/
--
hundred-and-one symptoms of being an internet addict:
103. When you find yourself in the "Computer" section of Barnes & Noble
enjoying yourself.
/// 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/202107091755.169HtP6I354080%40masaka.moolenaar.net.