To: vim_dev@googlegroups.com Subject: Patch 8.2.3479 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3479 Problem: Crash when calling job_start with an invalid argument. (Virginia Senioria) Solution: Clear the first item in argv. (closes #8957) Files: src/misc2.c, src/testdir/test_channel.vim *** ../vim-8.2.3478/src/misc2.c 2021-08-17 21:14:25.621495451 +0100 --- src/misc2.c 2021-10-05 19:17:49.762460685 +0100 *************** *** 2953,2958 **** --- 2953,2959 ---- for (i = 0; i < *argc; ++i) VIM_CLEAR((*argv)[i]); + (*argv)[0] = NULL; return FAIL; } (*argv)[*argc] = (char *)vim_strsave(s); *** ../vim-8.2.3478/src/testdir/test_channel.vim 2021-08-28 11:30:09.689044139 +0100 --- src/testdir/test_channel.vim 2021-10-05 19:16:14.341115281 +0100 *************** *** 2362,2366 **** --- 2362,2370 ---- augroup END endfunc + func Test_job_start_with_invalid_argument() + call assert_fails('call job_start([0zff])', 'E976:') + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.3478/src/version.c 2021-10-05 11:22:21.553842709 +0100 --- src/version.c 2021-10-05 19:13:41.806947102 +0100 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3479, /**/ -- 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 -- Bram@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 ///