summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-08-22 16:09:50 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-08-22 16:09:50 +0000
commit324632ad309f5e20994ed7b63e56216f1b47ff08 (patch)
treed5a7d22988b8316d2c0bca4e22f2171acf300ec6 /usr.bin
parent0f0e580be811af82312ef8d2e654426de7af3087 (diff)
MSG_EXIT can now have a return code in the message, so check for that
size as well. Stops the client fatal()ing on exit.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c
index 943f5bbac61..397edd98e2b 100644
--- a/usr.bin/tmux/client.c
+++ b/usr.bin/tmux/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.42 2010/06/28 22:10:42 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.43 2010/08/22 16:09:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -297,7 +297,8 @@ client_dispatch(void)
client_exitmsg = "detached";
break;
case MSG_EXIT:
- if (datalen != 0)
+ if (datalen != 0 &&
+ datalen != sizeof (struct msg_exit_data))
fatalx("bad MSG_EXIT size");
client_write_server(MSG_EXITING, NULL, 0);