summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-08-22 16:09:49 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-08-22 16:09:49 +0000
commit5f5104e782782a26e436d5cfd59e3d38ad9063fa (patch)
tree5737172895994b0dd17364c9ef1b3588dbe940d2 /client.c
parente3be9b1951856f84d30c2903eccdf792618f71ba (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 'client.c')
-rw-r--r--client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.c b/client.c
index e86a64ad..3ee3e4ef 100644
--- a/client.c
+++ b/client.c
@@ -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);