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.
This commit is contained in:
Nicholas Marriott 2010-08-22 16:09:49 +00:00
parent e3be9b1951
commit 5f5104e782

View File

@ -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);