mirror of
https://github.com/tmux/tmux.git
synced 2026-10-09 11:44:23 +00:00
Clear cfg_client if the client is destroyed to prevent UAF found by Ilya
Grigoriev.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: server-client.c,v 1.494 2026/07/15 14:14:50 nicm Exp $ */
|
/* $OpenBSD: server-client.c,v 1.495 2026/07/17 08:13:23 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -502,6 +502,8 @@ server_client_lost(struct client *c)
|
|||||||
struct client_file *cf, *cf1;
|
struct client_file *cf, *cf1;
|
||||||
struct client_window *cw, *cw1;
|
struct client_window *cw, *cw1;
|
||||||
|
|
||||||
|
if (cfg_client == c)
|
||||||
|
cfg_client = NULL;
|
||||||
c->flags |= CLIENT_DEAD;
|
c->flags |= CLIENT_DEAD;
|
||||||
|
|
||||||
server_client_clear_overlay(c);
|
server_client_clear_overlay(c);
|
||||||
|
|||||||
Reference in New Issue
Block a user