Unified stream length checks
* Added new function to check for lenght and log * Replace all usages with this new function
This commit is contained in:
parent
5306c3ec0a
commit
48a6c0b815
@ -134,11 +134,9 @@ BOOL freerdp_channel_process(freerdp* instance, wStream* s, UINT16 channelId, si
|
||||
chunkLength);
|
||||
return FALSE;
|
||||
}
|
||||
if (length < chunkLength)
|
||||
{
|
||||
WLog_ERR(TAG, "Expected %" PRIu32 " bytes, but have %" PRIdz, length, chunkLength);
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, length))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
IFCALLRET(instance->ReceiveChannelData, rc, instance, channelId, Stream_Pointer(s), chunkLength,
|
||||
flags, length);
|
||||
if (!rc)
|
||||
|
Loading…
Reference in New Issue
Block a user