Problem: Crash when using NULL job.
Solution: Copy static string into buffer. (issue #8260)
char *status;
if (job == NULL)
- return (char_u *)"no process";
+ {
+ vim_snprintf((char *)buf, NUMBUFLEN, "no process");
+ return buf;
+ }
status = job->jv_status == JOB_FAILED ? "fail"
: job->jv_status >= JOB_ENDED ? "dead"
: "run";
endtry
endfunc
+func Test_null_job_eval()
+ call assert_fails('eval test_null_job()->eval()', 'E121:')
+endfunc
+
" This was leaking memory.
func Test_partial_in_channel_cycle()
let d = {}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3379,
/**/
3378,
/**/