[PORTCLS]

- check if there are enough irp stack locations

svn path=/trunk/; revision=68328
This commit is contained in:
Johannes Anderwald 2015-07-01 07:39:35 +00:00
parent edae2b9bfb
commit a5e2945149

View file

@ -548,7 +548,11 @@ PcForwardIrpSynchronous(
// initialize the notification event // initialize the notification event
KeInitializeEvent(&Event, NotificationEvent, FALSE); KeInitializeEvent(&Event, NotificationEvent, FALSE);
IoCopyCurrentIrpStackLocationToNext(Irp); // are there enough irp stack locations
if (Irp->CurrentLocation < Irp->StackCount + 1)
{
IoCopyCurrentIrpStackLocationToNext(Irp);
}
IoSetCompletionRoutine(Irp, CompletionRoutine, (PVOID)&Event, TRUE, TRUE, TRUE); IoSetCompletionRoutine(Irp, CompletionRoutine, (PVOID)&Event, TRUE, TRUE, TRUE);