mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
If the prompt is hidden or a password is sent with -U, zero it before freeing
it.
This commit is contained in:
@ -278,13 +278,14 @@ server_msg_fn_unlock(struct hdr *hdr, struct client *c)
|
||||
if (server_unlock(pass) != 0) {
|
||||
#define MSG "bad password"
|
||||
server_write_client(c, MSG_ERROR, MSG, (sizeof MSG) - 1);
|
||||
server_write_client(c, MSG_EXIT, NULL, 0);
|
||||
return (0);
|
||||
#undef MSG
|
||||
}
|
||||
|
||||
server_write_client(c, MSG_EXIT, NULL, 0);
|
||||
|
||||
memset(pass, 0, strlen(pass));
|
||||
xfree(pass);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user