mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[USBPORT] Avoid a benign integer overflow in USBHI_QueryDeviceInformation (CID 1419219).
This commit is contained in:
parent
45741cdf3a
commit
a45779a12f
1 changed files with 2 additions and 2 deletions
|
@ -211,8 +211,8 @@ USBHI_QueryDeviceInformation(IN PVOID BusContext,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ActualLength = sizeof(USB_DEVICE_INFORMATION_0) +
|
ActualLength = FIELD_OFFSET(USB_DEVICE_INFORMATION_0, PipeList) +
|
||||||
(NumberOfOpenPipes - 1) * sizeof(USB_PIPE_INFORMATION_0);
|
NumberOfOpenPipes * sizeof(USB_PIPE_INFORMATION_0);
|
||||||
|
|
||||||
if (DeviceInfoBufferLen < ActualLength)
|
if (DeviceInfoBufferLen < ActualLength)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue