Patch 8.2.3134

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 9, 2021, 1:55:34 PM7/9/21
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages