mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[NTOS:IO] Fix IRP stack location check in IoForwardIrpSynchronously
We are doing IoCallDriver here, so the valid stack location should be CurrentLocation <= Irp->StackCount (just a check for a completly incorrect value) && CurrentLocation > 1 (ensure that we have a place for another call) CORE-17189 Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
This commit is contained in:
@@ -1629,7 +1629,7 @@ IoForwardIrpSynchronously(IN PDEVICE_OBJECT DeviceObject,
|
||||
NTSTATUS Status;
|
||||
|
||||
/* Check if next stack location is available */
|
||||
if (Irp->CurrentLocation < Irp->StackCount)
|
||||
if (Irp->CurrentLocation > Irp->StackCount || Irp->CurrentLocation <= 1)
|
||||
{
|
||||
/* No more stack location */
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user