mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Set the current window pointer to NULL when killing a winlink that is to be
replaced with link-window -k. This prevents it being pushed onto the last window stack and causing a use-after-free. Only took me an hour to find this :-/...
This commit is contained in:
parent
64b5f39656
commit
fbb030d7f7
@ -284,8 +284,10 @@ server_link_window(struct session *src, struct winlink *srcwl,
|
||||
winlink_remove(&dst->windows, dstwl);
|
||||
|
||||
/* Force select/redraw if current. */
|
||||
if (dstwl == dst->curw)
|
||||
if (dstwl == dst->curw) {
|
||||
selectflag = 1;
|
||||
dst->curw = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user