mirror of
https://github.com/zoriya/vim.git
synced 2026-06-08 22:06:16 +00:00
patch 8.2.3379: crash when using NULL job
Problem: Crash when using NULL job. Solution: Copy static string into buffer. (issue #8260)
This commit is contained in:
@@ -1983,7 +1983,10 @@ job_to_string_buf(typval_T *varp, char_u *buf)
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user