Author: janderwald
Date: Wed Jul  1 07:39:35 2015
New Revision: 68328
URL: 
http://svn.reactos.org/svn/reactos?rev=68328&view=rev
Log:
[PORTCLS]
- check if there are enough irp stack locations
Modified:
    trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp     [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp     [iso-8859-1] Wed Jul  1
07:39:35 2015
@@ -548,7 +548,11 @@
     // 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);