diff --git a/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp b/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp index 2cd09818ff7..bb535ed204c 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp @@ -548,7 +548,11 @@ PcForwardIrpSynchronous( // initialize the notification event 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);