libfreerdp-core: fix redirection with standard RDP security

This commit is contained in:
Marc-André Moreau 2015-09-21 15:36:19 -04:00
parent 70b037145e
commit a91506161d

View File

@ -387,8 +387,11 @@ int rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, wStream* s)
if (status < 0)
return status;
if (!Stream_SafeSeek(s, 1)) /* pad2Octets (1 byte) */
return -1;
if (Stream_GetRemainingLength(s) >= 1)
{
/* this field is optional, and its absence is not an error */
Stream_Seek(s, 1); /* pad2Octets (1 byte) */
}
return status;
}