diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-06-30 13:40:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-06-30 13:40:31 +0000 |
commit | d267c41883fe3d9f1690b43fd89aa1a084358779 (patch) | |
tree | ab6b473be2fb314e38fdba6079d481794e26eb5c /usr.bin/tmux | |
parent | 4c5fd7208e41155908077f94248f6873b3169c5b (diff) |
When unlocking the server, don't try to clear the prompt on clients without a
prompt (such as the one issuing the unlock request).
This caused the server to die if the wrong password was entered when unlocking
from the command line with -U (nasty).
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/server-fn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index 9449842a544..e6003d98607 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.2 2009/06/25 06:15:04 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.3 2009/06/30 13:40:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -214,7 +214,7 @@ server_unlock(const char *s) wrong: for (i = 0; i < ARRAY_LENGTH(&clients); i++) { c = ARRAY_ITEM(&clients, i); - if (c == NULL) + if (c == NULL || c->prompt_buffer == NULL) continue; *c->prompt_buffer = '\0'; |