mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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) +
|
||||
(NumberOfOpenPipes - 1) * sizeof(USB_PIPE_INFORMATION_0);
|
||||
ActualLength = FIELD_OFFSET(USB_DEVICE_INFORMATION_0, PipeList) +
|
||||
NumberOfOpenPipes * sizeof(USB_PIPE_INFORMATION_0);
|
||||
|
||||
if (DeviceInfoBufferLen < ActualLength)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue