Fixed int overflow in msusb_mspipes_read
Thanks to hac425
This commit is contained in:
parent
8e9b0a625b
commit
9f77fc3dd2
@ -64,7 +64,7 @@ static MSUSB_PIPE_DESCRIPTOR** msusb_mspipes_read(wStream* s, UINT32 NumberOfPip
|
||||
UINT32 pnum;
|
||||
MSUSB_PIPE_DESCRIPTOR** MsPipes;
|
||||
|
||||
if (Stream_GetRemainingCapacity(s) < 12 * NumberOfPipes)
|
||||
if (Stream_GetRemainingCapacity(s) / 12 < NumberOfPipes)
|
||||
return NULL;
|
||||
|
||||
MsPipes = (MSUSB_PIPE_DESCRIPTOR**)calloc(NumberOfPipes, sizeof(MSUSB_PIPE_DESCRIPTOR*));
|
||||
|
Loading…
Reference in New Issue
Block a user