mirror of https://github.com/FreeRDP/FreeRDP
Ensure urb_create_iocompletion uses size_t for calculation
This commit is contained in:
parent
b54ca508ac
commit
49bd22aea7
|
@ -97,7 +97,13 @@ static wStream* urb_create_iocompletion(UINT32 InterfaceField, UINT32 MessageId,
|
|||
UINT32 OutputBufferSize)
|
||||
{
|
||||
const UINT32 InterfaceId = (STREAM_ID_PROXY << 30) | (InterfaceField & 0x3FFFFFFF);
|
||||
wStream* out = Stream_New(NULL, OutputBufferSize + 28);
|
||||
|
||||
#if UINT32_MAX >= SIZE_MAX
|
||||
if (OutputBufferSize > UINT32_MAX - 28ull)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
wStream* out = Stream_New(NULL, OutputBufferSize + 28ull);
|
||||
|
||||
if (!out)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue