From bee4544192a7fb571a2f57d5e00e8fed09bdee5e Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sat, 13 Jul 2019 23:50:50 +0200 Subject: [PATCH] WSEventLoop: Treat invalid window types the same as unknown window types And forcefully disconnect the client in both cases. --- Servers/WindowServer/WSEventLoop.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Servers/WindowServer/WSEventLoop.cpp b/Servers/WindowServer/WSEventLoop.cpp index 58819829ac..9c93e090c0 100644 --- a/Servers/WindowServer/WSEventLoop.cpp +++ b/Servers/WindowServer/WSEventLoop.cpp @@ -212,10 +212,7 @@ bool WSEventLoop::on_receive_from_client(int client_id, const WSAPI_ClientMessag ws_window_type = WSWindowType::Menubar; break; case WSAPI_WindowType::Invalid: - break; // handled below - } - - if (ws_window_type == WSWindowType::Invalid) { + default: dbgprintf("Unknown WSAPI_WindowType: %d\n", message.window.type); client.did_misbehave(); return false;