summaryrefslogtreecommitdiffstats
path: root/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-06-30 13:40:30 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-06-30 13:40:30 +0000
commit4c5c125173e07dcc061aa162b08d1722c73abe7d (patch)
tree06b375a2dfdd8226ae705f78ac8796084e79c286 /server-fn.c
parent68e06fb6b76b250b1971867244f33eb809891b1f (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 'server-fn.c')
-rw-r--r--server-fn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server-fn.c b/server-fn.c
index a025bf0a..fb40a624 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -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';