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:
Pascal Nowack
2023-04-27 10:43:36 +02:00
committed by akallabeth
parent 05edcbc357
commit 264d19765c

View File

@@ -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)
{