if (Stream_GetRemainingLength(s) < 8)
return FALSE;
+ /* [MS-RDPBCGR] 3.1.5.2.2 Processing of Virtual Channel PDU
+ * chunked data. Length is the total size of the combined data,
+ * chunkLength is the actual data received.
+ * check chunkLength against packetLength, which is the TPKT header size.
+ */
Stream_Read_UINT32(s, length);
Stream_Read_UINT32(s, flags);
chunkLength = Stream_GetRemainingLength(s);
}
if (length < chunkLength)
{
- WLog_ERR(TAG, "Expected %" PRIu32 " bytes, but only have %" PRIdz, length, chunkLength);
+ WLog_ERR(TAG, "Expected %" PRIu32 " bytes, but have %" PRIdz, length, chunkLength);
return FALSE;
}
IFCALLRET(instance->ReceiveChannelData, rc, instance, channelId, Stream_Pointer(s), chunkLength,
else if (client->ReceiveChannelData)
{
int rc = client->ReceiveChannelData(client, channelId, Stream_Pointer(s), chunkLength,
- flags, length);
+ flags, length);
if (rc < 0)
return FALSE;
}