mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00: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:
		@@ -911,8 +911,10 @@ server_client_msg_identify(
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (!isatty(fd))
 | 
			
		||||
	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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user