Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
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);
}
Exemplo n.º 4
0
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);
}