From 5f5104e782782a26e436d5cfd59e3d38ad9063fa Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 22 Aug 2010 16:09:49 +0000 Subject: 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. --- client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client.c') 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); -- cgit v1.2.3