From: Martin Fleisz Date: Wed, 11 Jul 2018 13:06:31 +0000 (+0200) Subject: rdpsnd: Fix sending of wave2 PDU X-Git-Tag: 2.0.0-rc3~14^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ec9579013270dd648f1d5283727a03e6a814c88;p=platform%2Fupstream%2Ffreerdp.git rdpsnd: Fix sending of wave2 PDU According to MS-RDPEA 2.2.3.10 the Wave2 PDU's header BodySize field should be equal the size of the PDU minus the header (4 Bytes). --- diff --git a/channels/rdpsnd/server/rdpsnd_main.c b/channels/rdpsnd/server/rdpsnd_main.c index 0824f0e..8d582c5 100644 --- a/channels/rdpsnd/server/rdpsnd_main.c +++ b/channels/rdpsnd/server/rdpsnd_main.c @@ -507,7 +507,7 @@ static UINT rdpsnd_server_send_wave2_pdu(RdpsndServerContext* context, /* Set stream size */ end = Stream_GetPosition(s); Stream_SetPosition(s, 2); - Stream_Write_UINT16(s, end); + Stream_Write_UINT16(s, end - 4); Stream_SetPosition(s, end); Stream_SealLength(s); context->block_no = (context->block_no + 1) % 256;