From: John Hodge (sonata) Date: Thu, 6 Nov 2014 23:12:06 +0000 (+0800) Subject: Usermode/libaxwin4 - Handle demarshal failure X-Git-Url: https://git.ucc.asn.au/?p=tpg%2Facess2.git;a=commitdiff_plain;h=13078002b01ee4f63eb2001d2ef479a2a006ea32 Usermode/libaxwin4 - Handle demarshal failure --- diff --git a/Usermode/Libraries/libaxwin4.so_src/wm.cpp b/Usermode/Libraries/libaxwin4.so_src/wm.cpp index 7ce61e4b..3672078f 100644 --- a/Usermode/Libraries/libaxwin4.so_src/wm.cpp +++ b/Usermode/Libraries/libaxwin4.so_src/wm.cpp @@ -127,6 +127,10 @@ extern "C" void *AxWin4_GetWindowBuffer(tAxWin4_Window *Window) uint64_t handle = response.ReadU64(); Window->m_fd = _SysUnMarshalFD(handle); + if( Window->m_fd == -1 ) { + _SysDebug("AxWin4_GetWindowBuffer: Unable to unmarshal resultant FD (0x%llx)", handle); + return NULL; + } _SysDebug("AxWin4_GetWindowBuffer: %llx = %i", handle, Window->m_fd); }