mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[warnings] fix various clang-tidy warnings
This commit is contained in:
@@ -502,7 +502,6 @@ fail:
|
||||
*/
|
||||
static UINT rdpgfx_recv_reset_graphics_pdu(GENERIC_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
int pad = 0;
|
||||
MONITOR_DEF* monitor = NULL;
|
||||
RDPGFX_RESET_GRAPHICS_PDU pdu = { 0 };
|
||||
WINPR_ASSERT(callback);
|
||||
@@ -543,7 +542,13 @@ static UINT rdpgfx_recv_reset_graphics_pdu(GENERIC_CHANNEL_CALLBACK* callback, w
|
||||
Stream_Read_UINT32(s, monitor->flags); /* flags (4 bytes) */
|
||||
}
|
||||
|
||||
pad = 340 - (RDPGFX_HEADER_SIZE + 12 + (pdu.monitorCount * 20));
|
||||
const size_t size = (RDPGFX_HEADER_SIZE + 12ULL + (pdu.monitorCount * 20ULL));
|
||||
if (size > 340)
|
||||
{
|
||||
free(pdu.monitorDefArray);
|
||||
return CHANNEL_RC_NULL_DATA;
|
||||
}
|
||||
const size_t pad = 340ULL - size;
|
||||
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, s, (size_t)pad))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user