mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 16:43:11 +01:00
Merge branch 'obsd-master'
Sync from OpenBSD. * obsd-master: Do not leak file descriptor if not a tty, reported by Sebastien Marie.
This commit is contained in:
commit
80b5c0e076
@ -911,8 +911,10 @@ server_client_msg_identify(
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isatty(fd))
|
||||
return;
|
||||
if (!isatty(fd)) {
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
data->term[(sizeof data->term) - 1] = '\0';
|
||||
tty_init(&c->tty, c, fd, data->term);
|
||||
if (data->flags & IDENTIFY_UTF8)
|
||||
|
Loading…
Reference in New Issue
Block a user