Zero the password given to -U in the client as well.

This commit is contained in:
Nicholas Marriott 2009-06-25 15:56:25 +00:00
parent 418128bebc
commit f90450f854

3
tmux.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: tmux.c,v 1.6 2009/06/03 17:04:16 nicm Exp $ */ /* $OpenBSD: tmux.c,v 1.7 2009/06/04 21:56:14 nicm Exp $ */
/* /*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -437,6 +437,7 @@ main(int argc, char **argv)
b = buffer_create(BUFSIZ); b = buffer_create(BUFSIZ);
if (unlock) { if (unlock) {
cmd_send_string(b, pass); cmd_send_string(b, pass);
memset(pass, 0, strlen(pass));
client_write_server( client_write_server(
&cctx, MSG_UNLOCK, BUFFER_OUT(b), BUFFER_USED(b)); &cctx, MSG_UNLOCK, BUFFER_OUT(b), BUFFER_USED(b));
} else { } else {