IofCallDriver(): Check for NULL MajorFunction handlers with KeBugCheck(0)
authorshort <>
Sat, 1 Feb 2003 00:07:54 +0000 (00:07 +0000)
committershort <>
Sat, 1 Feb 2003 00:07:54 +0000 (00:07 +0000)
 - support for gdb(1) to not to loose stackframe tracking if NULL is hit

ntoskrnl/io/irp.c

index 0b681f9..84e8e4d 100644 (file)
@@ -131,6 +131,8 @@ IofCallDriver(PDEVICE_OBJECT DeviceObject,
   DPRINT("MajorFunction %d\n", Param->MajorFunction);
   DPRINT("DriverObject->MajorFunction[Param->MajorFunction] %x\n",
         DriverObject->MajorFunction[Param->MajorFunction]);
+  if (!DriverObject->MajorFunction[Param->MajorFunction])
+    KeBugCheck(0);
   Status = DriverObject->MajorFunction[Param->MajorFunction](DeviceObject,
                                                             Irp);