mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[USBHUB] USBH_FdoQueryBusRelations: Fix an off by one (#9298)
Fix an out of bounds heap read when compacting the ghost device list. Change the loop condition from `GhostPort < DeviceRelations->Count` to `GhostPort < DeviceRelations->Count - 1` so the array shift never reads past the last valid entry.
This commit is contained in:
@@ -1392,7 +1392,7 @@ RelationsWorker:
|
||||
if (PdoExt(PdoDevice)->EnumFlags & USBHUB_ENUM_FLAG_GHOST_DEVICE)
|
||||
{
|
||||
for (GhostPort = Port;
|
||||
GhostPort < DeviceRelations->Count;
|
||||
GhostPort < DeviceRelations->Count - 1;
|
||||
GhostPort++)
|
||||
{
|
||||
DeviceRelations->Objects[GhostPort] =
|
||||
|
||||
Reference in New Issue
Block a user