mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
core/server: Use correct size for DVC data PDUs
The VirtualChannelChunkSize setting refers to the VCChunkSize for static channels and not to the maximum size for DVC data PDUs. DVC data PDUs are according to [MS-RDPEDYC] always limited to 1600 Bytes.
This commit is contained in:
committed by
akallabeth
parent
05edcbc357
commit
264d19765c
@@ -49,6 +49,8 @@
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define DVC_MAX_DATA_PDU_SIZE 1600
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT16 channelId;
|
||||
@@ -1578,12 +1580,9 @@ BOOL WINAPI FreeRDP_WTSVirtualChannelWrite(HANDLE hChannelHandle, PCHAR Buffer,
|
||||
WINPR_ASSERT(channel->client);
|
||||
context = channel->client->context;
|
||||
WINPR_ASSERT(context);
|
||||
WINPR_ASSERT(context->settings);
|
||||
while (Length > 0)
|
||||
{
|
||||
const UINT32 VirtualChannelChunkSize =
|
||||
freerdp_settings_get_uint32(context->settings, FreeRDP_VirtualChannelChunkSize);
|
||||
s = Stream_New(NULL, VirtualChannelChunkSize);
|
||||
s = Stream_New(NULL, DVC_MAX_DATA_PDU_SIZE);
|
||||
|
||||
if (!s)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user