Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2017-12-19 16:01:20 +00:00
4 changed files with 49 additions and 16 deletions

View File

@ -159,7 +159,7 @@ server_client_is_default_key_table(struct client *c, struct key_table *table)
}
/* Create a new client. */
void
struct client *
server_client_create(int fd)
{
struct client *c;
@ -212,6 +212,7 @@ server_client_create(int fd)
TAILQ_INSERT_TAIL(&clients, c, entry);
log_debug("new client %p", c);
return (c);
}
/* Open client terminal if needed. */
@ -1560,6 +1561,9 @@ server_client_dispatch_command(struct client *c, struct imsg *imsg)
int argc;
char **argv, *cause;
if (c->flags & CLIENT_EXIT)
return;
if (imsg->hdr.len - IMSG_HEADER_SIZE < sizeof data)
fatalx("bad MSG_COMMAND size");
memcpy(&data, imsg->data, sizeof data);