mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-17 16:35:00 +00:00
Fix CVE-2018-19387
This commit is contained in:
parent
ac919516f4
commit
3e12f558c7
4 changed files with 12 additions and 0 deletions
2
format.c
2
format.c
|
|
@ -468,6 +468,8 @@ format_cb_pane_tabs(struct format_tree *ft, struct format_entry *fe)
|
|||
return;
|
||||
|
||||
buffer = evbuffer_new();
|
||||
if (buffer == NULL)
|
||||
fatalx("out of memory");
|
||||
for (i = 0; i < wp->base.grid->sx; i++) {
|
||||
if (!bit_test(wp->base.tabs, i))
|
||||
continue;
|
||||
|
|
|
|||
2
input.c
2
input.c
|
|
@ -766,6 +766,8 @@ input_init(struct window_pane *wp)
|
|||
ictx->input_buf = xmalloc(INPUT_BUF_START);
|
||||
|
||||
ictx->since_ground = evbuffer_new();
|
||||
if (ictx->since_ground == NULL)
|
||||
fatalx("out of memory");
|
||||
|
||||
input_reset(wp, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,8 +121,14 @@ server_client_create(int fd)
|
|||
c->cmdq->client_exit = 1;
|
||||
|
||||
c->stdin_data = evbuffer_new();
|
||||
if (c->stdin_data == NULL)
|
||||
fatalx("out of memory");
|
||||
c->stdout_data = evbuffer_new();
|
||||
if (c->stdout_data == NULL)
|
||||
fatalx("out of memory");
|
||||
c->stderr_data = evbuffer_new();
|
||||
if (c->stderr_data == NULL)
|
||||
fatalx("out of memory");
|
||||
|
||||
c->tty.fd = -1;
|
||||
c->title = NULL;
|
||||
|
|
|
|||
2
window.c
2
window.c
|
|
@ -945,6 +945,8 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv,
|
|||
|
||||
wp->event = bufferevent_new(wp->fd, window_pane_read_callback, NULL,
|
||||
window_pane_error_callback, wp);
|
||||
if (wp->event == NULL)
|
||||
fatalx("out of memory");
|
||||
|
||||
bufferevent_setwatermark(wp->event, EV_READ, 0, READ_SIZE);
|
||||
bufferevent_enable(wp->event, EV_READ|EV_WRITE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue