libfreerdp-core: fix receiving of logon error info during capability exchange
This commit is contained in:
parent
a8e62e938a
commit
161359f6ec
@ -3594,10 +3594,23 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pduType == PDU_TYPE_DATA)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* We can receive a Save Session Info Data PDU containing a LogonErrorInfo
|
||||||
|
* structure at this point from the server to indicate a connection error.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (rdp_recv_data_pdu(rdp, s) < 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (pduType != PDU_TYPE_DEMAND_ACTIVE)
|
if (pduType != PDU_TYPE_DEMAND_ACTIVE)
|
||||||
{
|
{
|
||||||
if (pduType != PDU_TYPE_SERVER_REDIRECTION)
|
if (pduType != PDU_TYPE_SERVER_REDIRECTION)
|
||||||
WLog_ERR(TAG, "expected PDU_TYPE_DEMAND_ACTIVE %04x, got %04x", PDU_TYPE_DEMAND_ACTIVE, pduType);
|
WLog_ERR(TAG, "expected PDU_TYPE_DEMAND_ACTIVE %04x, got %04x", PDU_TYPE_DEMAND_ACTIVE, pduType);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -726,7 +726,7 @@ BOOL rdp_recv_logon_error_info(rdpRdp* rdp, wStream* s)
|
|||||||
UINT32 errorNotificationData;
|
UINT32 errorNotificationData;
|
||||||
UINT32 errorNotificationType;
|
UINT32 errorNotificationType;
|
||||||
|
|
||||||
if (Stream_GetRemainingLength(s) < 4)
|
if (Stream_GetRemainingLength(s) < 8)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
Stream_Read_UINT32(s, errorNotificationData); /* errorNotificationData (4 bytes) */
|
Stream_Read_UINT32(s, errorNotificationData); /* errorNotificationData (4 bytes) */
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
#define TAG FREERDP_TAG("core.rdp")
|
#define TAG FREERDP_TAG("core.rdp")
|
||||||
|
|
||||||
#ifdef WITH_DEBUG_RDP
|
|
||||||
const char* DATA_PDU_TYPE_STRINGS[80] =
|
const char* DATA_PDU_TYPE_STRINGS[80] =
|
||||||
{
|
{
|
||||||
"?", "?", /* 0x00 - 0x01 */
|
"?", "?", /* 0x00 - 0x01 */
|
||||||
@ -72,7 +71,6 @@ const char* DATA_PDU_TYPE_STRINGS[80] =
|
|||||||
"FrameAcknowledge", "?", "?", /* 0x38 - 0x40 */
|
"FrameAcknowledge", "?", "?", /* 0x38 - 0x40 */
|
||||||
"?", "?", "?", "?", "?", "?" /* 0x41 - 0x46 */
|
"?", "?", "?", "?", "?", "?" /* 0x41 - 0x46 */
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read RDP Security Header.\n
|
* Read RDP Security Header.\n
|
||||||
@ -809,10 +807,8 @@ int rdp_recv_data_pdu(rdpRdp* rdp, wStream* s)
|
|||||||
Stream_Seek(s, SrcSize);
|
Stream_Seek(s, SrcSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_DEBUG_RDP
|
|
||||||
WLog_DBG(TAG, "recv %s Data PDU (0x%02X), length: %d",
|
WLog_DBG(TAG, "recv %s Data PDU (0x%02X), length: %d",
|
||||||
type < ARRAYSIZE(DATA_PDU_TYPE_STRINGS) ? DATA_PDU_TYPE_STRINGS[type] : "???", type, length);
|
type < ARRAYSIZE(DATA_PDU_TYPE_STRINGS) ? DATA_PDU_TYPE_STRINGS[type] : "???", type, length);
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user