Patch 8.2.0029
Problem: MS-Windows: crash with empty job command.
Solution: Check for NULL result. (Yasuhiro Matsumoto, closes #5390)
Files: src/channel.c, src/testdir/test_channel.vim
*** ../vim-8.2.0028/src/channel.c 2019-11-30 20:46:46.000000000 +0100
--- src/channel.c 2019-12-21 22:19:40.048698371 +0100
***************
*** 5947,5952 ****
--- 5947,5957 ----
if (win32_build_cmd(l, &ga) == FAIL)
goto theend;
cmd = ga.ga_data;
+ if (cmd == NULL)
+ {
+ emsg(_(e_invarg));
+ goto theend;
+ }
#endif
}
*** ../vim-8.2.0028/src/testdir/test_channel.vim 2019-12-07
17:09:24.000000000 +0100
--- src/testdir/test_channel.vim 2019-12-21 22:17:28.745122184 +0100
***************
*** 1331,1344 ****
endfunc
func Test_close_handle()
- call ch_log('Test_close_handle()')
call s:run_server('Ch_close_handle')
endfunc
""""""""""
func Test_open_fail()
- call ch_log('Test_open_fail()')
silent! let ch = ch_open("noserver")
echo ch
let d = ch
--- 1331,1342 ----
***************
*** 1360,1366 ****
endfunc
func Test_open_delay()
- call ch_log('Test_open_delay()')
" The server will wait half a second before creating the port.
call s:run_server('Ch_open_delay', 'delay')
endfunc
--- 1358,1363 ----
***************
*** 1384,1390 ****
endfunc
func Test_call()
- call ch_log('Test_call()')
call s:run_server('Ch_test_call')
endfunc
--- 1381,1386 ----
***************
*** 1473,1479 ****
endfunc
func Test_close_callback()
- call ch_log('Test_close_callback()')
call s:run_server('Ch_test_close_callback')
endfunc
--- 1469,1474 ----
***************
*** 1495,1501 ****
endfunc
func Test_close_partial()
- call ch_log('Test_close_partial()')
call s:run_server('Ch_test_close_partial')
endfunc
--- 1490,1495 ----
***************
*** 1712,1718 ****
endfunc
func Test_close_lambda()
- call ch_log('Test_close_lambda()')
call s:run_server('Ch_test_close_lambda')
endfunc
--- 1706,1711 ----
***************
*** 1965,1970 ****
--- 1958,1969 ----
endtry
endfunc
+ func Test_empty_job()
+ " This was crashing on MS-Windows.
+ let job = job_start([""])
+ call WaitForAssert({-> assert_equal("dead", job_status(job))})
+ endfunc
+
" Do this last, it stops any channel log.
func Test_zz_ch_log()
call ch_logfile('Xlog', 'w')
*** ../vim-8.2.0028/src/version.c 2019-12-21 22:00:46.300138235 +0100
--- src/version.c 2019-12-21 22:19:06.664806417 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 29,
/**/
--
Not too long ago, compress was something you did to garbage...
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
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/201912212122.xBLLMtco018040%40masaka.moolenaar.net.