Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'

* refs/remotes/tmux-openbsd/master:
  Clear cfg_client if the client is destroyed to prevent UAF found by Ilya Grigoriev.
This commit is contained in:
tmux update bot
2026-07-17 09:00:53 +00:00

View File

@@ -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>
@@ -498,6 +498,8 @@ server_client_lost(struct client *c)
struct client_file *cf, *cf1;
struct client_window *cw, *cw1;
if (cfg_client == c)
cfg_client = NULL;
c->flags |= CLIENT_DEAD;
server_client_clear_overlay(c);