To: vim_dev@googlegroups.com Subject: Patch 8.2.1773 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///