1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Don't allow cmd_lookup_client to test clients without a session.

This commit is contained in:
Nicholas Marriott 2009-10-14 09:29:10 +00:00
parent ad566a86de
commit adad557499

3
cmd.c
View File

@ -458,7 +458,8 @@ cmd_lookup_client(const char *name)
u_int i; u_int i;
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
if ((c = ARRAY_ITEM(&clients, i)) == NULL) c = ARRAY_ITEM(&clients, i);
if (c == NULL || c->session == NULL)
continue; continue;
path = c->tty.path; path = c->tty.path;