mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Do not deref NULL job in window_copy_pipe_run when job_run fails. From
Barrett Ruth in GitHub issue 5036.
This commit is contained in:
@@ -5171,7 +5171,8 @@ window_copy_pipe_run(struct window_mode_entry *wme, struct session *s,
|
|||||||
if (cmd != NULL && *cmd != '\0') {
|
if (cmd != NULL && *cmd != '\0') {
|
||||||
job = job_run(cmd, 0, NULL, NULL, s, NULL, NULL, NULL, NULL,
|
job = job_run(cmd, 0, NULL, NULL, s, NULL, NULL, NULL, NULL,
|
||||||
NULL, JOB_NOWAIT, -1, -1);
|
NULL, JOB_NOWAIT, -1, -1);
|
||||||
bufferevent_write(job_get_event(job), buf, *len);
|
if (job != NULL)
|
||||||
|
bufferevent_write(job_get_event(job), buf, *len);
|
||||||
}
|
}
|
||||||
return (buf);
|
return (buf);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user