mirror of
https://github.com/tmux/tmux.git
synced 2026-03-06 15:55:33 +00:00
tmux: tc can be NULL, so check before deref to avoid crashing the server
ok nicm
This commit is contained in:
@@ -168,7 +168,7 @@ cmd_send_keys_exec(struct cmd *self, struct cmdq_item *item)
|
||||
u_int count = args_count(args);
|
||||
char *cause = NULL;
|
||||
|
||||
if (tc->flags & CLIENT_READONLY && !args_has(args, 'X')) {
|
||||
if (tc != NULL && tc->flags & CLIENT_READONLY && !args_has(args, 'X')) {
|
||||
cmdq_error(item, "client is read-only");
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user