static int rdp_recv_fastpath_pdu(rdpRdp* rdp, wStream* s) { UINT16 length; rdpFastPath* fastpath; fastpath = rdp->fastpath; if (!fastpath_read_header_rdp(fastpath, s, &length)) return -1; if ((length == 0) || (length > Stream_GetRemainingLength(s))) { DEBUG_WARN( "incorrect FastPath PDU header length %d\n", length); return -1; } if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED) { UINT16 flags = (fastpath->encryptionFlags & FASTPATH_OUTPUT_SECURE_CHECKSUM) ? SEC_SECURE_CHECKSUM : 0; if (!rdp_decrypt(rdp, s, length, flags)) return -1; } return fastpath_recv_updates(rdp->fastpath, s); }
static int peer_recv_fastpath_pdu(freerdp_peer* client, wStream* s) { rdpRdp* rdp; UINT16 length; rdpFastPath* fastpath; rdp = client->context->rdp; fastpath = rdp->fastpath; //if (!fastpath_read_header_rdp(fastpath, s, &length)) // return -1; fastpath_read_header_rdp(fastpath, s, &length); if ((length == 0) || (length > stream_get_left(s))) { fprintf(stderr, "incorrect FastPath PDU header length %d\n", length); return -1; } if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED) { if (!rdp_decrypt(rdp, s, length, (fastpath->encryptionFlags & FASTPATH_OUTPUT_SECURE_CHECKSUM) ? SEC_SECURE_CHECKSUM : 0)) return -1; } return fastpath_recv_inputs(fastpath, s); }
static int peer_recv_fastpath_pdu(freerdp_peer* client, wStream* s) { rdpRdp* rdp; UINT16 length; rdpFastPath* fastpath; rdp = client->context->rdp; fastpath = rdp->fastpath; fastpath_read_header_rdp(fastpath, s, &length); if ((length == 0) || (length > Stream_GetRemainingLength(s))) { WLog_ERR(TAG, "incorrect FastPath PDU header length %d", length); return -1; } if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED) { if (!rdp_decrypt(rdp, s, length, (fastpath->encryptionFlags & FASTPATH_OUTPUT_SECURE_CHECKSUM) ? SEC_SECURE_CHECKSUM : 0)) return -1; } return fastpath_recv_inputs(fastpath, s); }
static tbool rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) { uint16 length; uint16 securityFlags; rdpFastPath* fastpath; LLOGLN(10, ("rdp_recv_fastpath_pdu:")); LHEXDUMP(10, (s->p, 4)); fastpath = rdp->fastpath; length = fastpath_read_header_rdp(fastpath, s); LLOGLN(10, ("rdp_recv_fastpath_pdu: length %d", length)); if (length == 0 || length > stream_get_left(s)) { LLOGLN(0, ("rdp_recv_fastpath_pdu: incorrect FastPath PDU header length %d", length)); return false; } if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED) { securityFlags = fastpath->encryptionFlags & FASTPATH_OUTPUT_SECURE_CHECKSUM ? SEC_SECURE_CHECKSUM : 0; rdp_decrypt(rdp, s, length, securityFlags); LLOGLN(10, ("rdp_recv_fastpath_pdu: decrypted data length %d", length)); LHEXDUMP(10, (s->p, length)); } return fastpath_recv_updates(rdp->fastpath, s); }
static boolean rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) { uint16 length; length = fastpath_read_header_rdp(rdp->fastpath, s); if (length == 0 || length > stream_get_left(s)) { printf("incorrect FastPath PDU header length %d\n", length); return False; } if (rdp->fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED) { rdp_decrypt(rdp, s, length); } return fastpath_recv_updates(rdp->fastpath, s); }
static tbool rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s) { uint16 length; rdpFastPath* fastpath; fastpath = rdp->fastpath; length = fastpath_read_header_rdp(fastpath, s); if (length == 0 || length > stream_get_left(s)) { printf("incorrect FastPath PDU header length %d\n", length); return false; } if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED) { rdp_decrypt(rdp, s, length, (fastpath->encryptionFlags & FASTPATH_OUTPUT_SECURE_CHECKSUM) ? SEC_SECURE_CHECKSUM : 0); } return fastpath_recv_updates(rdp->fastpath, s); }