mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
patch 8.2.0029: MS-Windows: crash with empty job command
Problem: MS-Windows: crash with empty job command. Solution: Check for NULL result. (Yasuhiro Matsumoto, closes #5390)
This commit is contained in:
@@ -5947,6 +5947,11 @@ job_start(
|
|||||||
if (win32_build_cmd(l, &ga) == FAIL)
|
if (win32_build_cmd(l, &ga) == FAIL)
|
||||||
goto theend;
|
goto theend;
|
||||||
cmd = ga.ga_data;
|
cmd = ga.ga_data;
|
||||||
|
if (cmd == NULL)
|
||||||
|
{
|
||||||
|
emsg(_(e_invarg));
|
||||||
|
goto theend;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1331,14 +1331,12 @@ func Ch_close_handle(port)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_close_handle()
|
func Test_close_handle()
|
||||||
call ch_log('Test_close_handle()')
|
|
||||||
call s:run_server('Ch_close_handle')
|
call s:run_server('Ch_close_handle')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
""""""""""
|
""""""""""
|
||||||
|
|
||||||
func Test_open_fail()
|
func Test_open_fail()
|
||||||
call ch_log('Test_open_fail()')
|
|
||||||
silent! let ch = ch_open("noserver")
|
silent! let ch = ch_open("noserver")
|
||||||
echo ch
|
echo ch
|
||||||
let d = ch
|
let d = ch
|
||||||
@@ -1360,7 +1358,6 @@ func Ch_open_delay(port)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_open_delay()
|
func Test_open_delay()
|
||||||
call ch_log('Test_open_delay()')
|
|
||||||
" The server will wait half a second before creating the port.
|
" The server will wait half a second before creating the port.
|
||||||
call s:run_server('Ch_open_delay', 'delay')
|
call s:run_server('Ch_open_delay', 'delay')
|
||||||
endfunc
|
endfunc
|
||||||
@@ -1384,7 +1381,6 @@ function Ch_test_call(port)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_call()
|
func Test_call()
|
||||||
call ch_log('Test_call()')
|
|
||||||
call s:run_server('Ch_test_call')
|
call s:run_server('Ch_test_call')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1473,7 +1469,6 @@ function Ch_test_close_callback(port)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_close_callback()
|
func Test_close_callback()
|
||||||
call ch_log('Test_close_callback()')
|
|
||||||
call s:run_server('Ch_test_close_callback')
|
call s:run_server('Ch_test_close_callback')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1495,7 +1490,6 @@ function Ch_test_close_partial(port)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_close_partial()
|
func Test_close_partial()
|
||||||
call ch_log('Test_close_partial()')
|
|
||||||
call s:run_server('Ch_test_close_partial')
|
call s:run_server('Ch_test_close_partial')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1712,7 +1706,6 @@ function Ch_test_close_lambda(port)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_close_lambda()
|
func Test_close_lambda()
|
||||||
call ch_log('Test_close_lambda()')
|
|
||||||
call s:run_server('Ch_test_close_lambda')
|
call s:run_server('Ch_test_close_lambda')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -1965,6 +1958,12 @@ func Test_zz_nl_err_to_out_pipe()
|
|||||||
endtry
|
endtry
|
||||||
endfunc
|
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.
|
" Do this last, it stops any channel log.
|
||||||
func Test_zz_ch_log()
|
func Test_zz_ch_log()
|
||||||
call ch_logfile('Xlog', 'w')
|
call ch_logfile('Xlog', 'w')
|
||||||
|
@@ -742,6 +742,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
29,
|
||||||
/**/
|
/**/
|
||||||
28,
|
28,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user