Patch 8.2.1773

5 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 29, 2020, 3:46:36 PM9/29/20
to vim...@googlegroups.com

Patch 8.2.1773
Problem: Crash when calling mapset() with a list as first argument.
Solution: Check for NULL. (closes #7040)
Files: src/map.c, src/testdir/test_maparg.vim


*** ../vim-8.2.1772/src/map.c 2020-09-02 22:25:31.717607993 +0200
--- src/map.c 2020-09-29 21:42:40.837160304 +0200
***************
*** 2304,2309 ****
--- 2304,2311 ----
char_u *arg;

which = tv_get_string_buf_chk(&argvars[0], buf);
+ if (which == NULL)
+ return;
mode = get_map_mode(&which, 0);
is_abbr = (int)tv_get_number(&argvars[1]);

*** ../vim-8.2.1772/src/testdir/test_maparg.vim 2020-09-27 22:47:01.884163380 +0200
--- src/testdir/test_maparg.vim 2020-09-29 21:44:03.244883055 +0200
***************
*** 238,243 ****
--- 238,245 ----
iunmap K
let &cpo = cpo_save
bwipe!
+
+ call assert_fails('call mapset([], v:false, {})', 'E730:')
endfunc

func Check_ctrlb_map(d, check_alt)
*** ../vim-8.2.1772/src/version.c 2020-09-29 21:23:17.881461813 +0200
--- src/version.c 2020-09-29 21:45:11.132657579 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1773,
/**/

--
hundred-and-one symptoms of being an internet addict:
21. Your dog has its own home page.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages