diff options
author | 2010-08-22 16:09:49 +0000 | |
---|---|---|
committer | 2010-08-22 16:09:49 +0000 | |
commit | 1be0a8636f2a93c98832af7b1e47033708abe2dc (patch) | |
tree | a4e493c33c496222693069c2962887e05dec8d13 /usr.bin/tmux/client.c | |
parent | * sort COMPATIBILITY in mdoc(7); ok kristaps@ (diff) | |
download | wireguard-openbsd-1be0a8636f2a93c98832af7b1e47033708abe2dc.tar.xz wireguard-openbsd-1be0a8636f2a93c98832af7b1e47033708abe2dc.zip |
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/tmux/client.c')
-rw-r--r-- | usr.bin/tmux/client.c | 5 |
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); |