From 7cbd63bd08b7a25dece2589403e330751a8ce2ef Mon Sep 17 00:00:00 2001 From: "John Hodge (sonata)" Date: Wed, 5 Nov 2014 16:06:57 +0800 Subject: [PATCH] Usermode/AxWin4 - (minor) Log and fail when wrong window ID is returned from server --- Usermode/Libraries/libaxwin4.so_src/wm.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Usermode/Libraries/libaxwin4.so_src/wm.cpp b/Usermode/Libraries/libaxwin4.so_src/wm.cpp index ee1895ea..7ce61e4b 100644 --- a/Usermode/Libraries/libaxwin4.so_src/wm.cpp +++ b/Usermode/Libraries/libaxwin4.so_src/wm.cpp @@ -118,9 +118,11 @@ extern "C" void *AxWin4_GetWindowBuffer(tAxWin4_Window *Window) req.WriteU16(Window->m_id); CDeserialiser response = GetSyncReply(req, IPCMSG_GETWINBUF); - if( response.ReadU16() != Window->m_id ) + unsigned int rspwin = response.ReadU16(); + if( rspwin != Window->m_id ) { - + _SysDebug("AxWin4_GetWindowBuffer: GETWINBUF reply for different window (%u != %u)", rspwin, Window->m_id); + return NULL; } uint64_t handle = response.ReadU64(); -- 2.20.1