libfreerdp-core: fix receiving of logon error info during capability exchange
This commit is contained in:
parent
a8e62e938a
commit
161359f6ec
@ -3594,6 +3594,19 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, wStream* s)
|
||||
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_SERVER_REDIRECTION)
|
||||
|
@ -726,7 +726,7 @@ BOOL rdp_recv_logon_error_info(rdpRdp* rdp, wStream* s)
|
||||
UINT32 errorNotificationData;
|
||||
UINT32 errorNotificationType;
|
||||
|
||||
if (Stream_GetRemainingLength(s) < 4)
|
||||
if (Stream_GetRemainingLength(s) < 8)
|
||||
return FALSE;
|
||||
|
||||
Stream_Read_UINT32(s, errorNotificationData); /* errorNotificationData (4 bytes) */
|
||||
|
@ -34,7 +34,6 @@
|
||||
|
||||
#define TAG FREERDP_TAG("core.rdp")
|
||||
|
||||
#ifdef WITH_DEBUG_RDP
|
||||
const char* DATA_PDU_TYPE_STRINGS[80] =
|
||||
{
|
||||
"?", "?", /* 0x00 - 0x01 */
|
||||
@ -72,7 +71,6 @@ const char* DATA_PDU_TYPE_STRINGS[80] =
|
||||
"FrameAcknowledge", "?", "?", /* 0x38 - 0x40 */
|
||||
"?", "?", "?", "?", "?", "?" /* 0x41 - 0x46 */
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Read RDP Security Header.\n
|
||||
@ -809,10 +807,8 @@ int rdp_recv_data_pdu(rdpRdp* rdp, wStream* s)
|
||||
Stream_Seek(s, SrcSize);
|
||||
}
|
||||
|
||||
#ifdef WITH_DEBUG_RDP
|
||||
WLog_DBG(TAG, "recv %s Data PDU (0x%02X), length: %d",
|
||||
type < ARRAYSIZE(DATA_PDU_TYPE_STRINGS) ? DATA_PDU_TYPE_STRINGS[type] : "???", type, length);
|
||||
#endif
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user