mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
[null-dereference] fix possible NULL dereference
This commit is contained in:
@@ -442,7 +442,8 @@ BOOL xf_generic_MotionNotify(xfContext* xfc, int x, int y, int state, Window win
|
||||
|
||||
if (xfc->fullscreen && !app)
|
||||
{
|
||||
XSetInputFocus(xfc->display, xfc->window->handle, RevertToPointerRoot, CurrentTime);
|
||||
if (xfc->window)
|
||||
XSetInputFocus(xfc->display, xfc->window->handle, RevertToPointerRoot, CurrentTime);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -997,7 +997,8 @@ static BOOL update_recv_notification_icon_info_order(rdpUpdate* update, wStream*
|
||||
return result;
|
||||
}
|
||||
|
||||
static BOOL update_read_desktop_actively_monitored_order(wStream* s, WINDOW_ORDER_INFO* orderInfo,
|
||||
static BOOL update_read_desktop_actively_monitored_order(wStream* s,
|
||||
const WINDOW_ORDER_INFO* orderInfo,
|
||||
MONITORED_DESKTOP_ORDER* monitored_desktop)
|
||||
{
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_DESKTOP_ACTIVE_WND)
|
||||
@@ -1016,7 +1017,10 @@ static BOOL update_read_desktop_actively_monitored_order(wStream* s, WINDOW_ORDE
|
||||
Stream_Read_UINT8(s, monitored_desktop->numWindowIds); /* numWindowIds (1 byte) */
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLengthOfSize(TAG, s, monitored_desktop->numWindowIds, 4ull))
|
||||
{
|
||||
monitored_desktop->numWindowIds = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (monitored_desktop->numWindowIds > 0)
|
||||
{
|
||||
@@ -1027,6 +1031,7 @@ static BOOL update_read_desktop_actively_monitored_order(wStream* s, WINDOW_ORDE
|
||||
{
|
||||
free(monitored_desktop->windowIds);
|
||||
monitored_desktop->windowIds = NULL;
|
||||
monitored_desktop->numWindowIds = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user