Fix oob read in msusb_msconfig_read
This commit is contained in:
parent
6b485b146a
commit
5305d62b72
@ -317,7 +317,7 @@ MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(wStream* s, UINT32 NumInterfaces)
|
|||||||
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
|
MSUSB_CONFIG_DESCRIPTOR* MsConfig;
|
||||||
BYTE lenConfiguration, typeConfiguration;
|
BYTE lenConfiguration, typeConfiguration;
|
||||||
|
|
||||||
if (Stream_GetRemainingCapacity(s) < 6 + NumInterfaces * 2)
|
if (Stream_GetRemainingCapacity(s) < 6ULL + NumInterfaces * 2ULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
MsConfig = msusb_msconfig_new();
|
MsConfig = msusb_msconfig_new();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user