Author: cgutman
Date: Thu Aug 18 18:35:03 2011
New Revision: 53304
URL:
http://svn.reactos.org/svn/reactos?rev=53304&view=rev
Log:
[NTOSKRNL]
- Implement a special case copy-in for IRP_MN_FILTER_RESOURCE_REQUIREMENTS to prevent NULL
pointer access in function drivers
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Thu Aug 18 18:35:03 2011
@@ -884,6 +884,14 @@
/* Initialize to failure */
Irp->IoStatus.Status = IoStatusBlock.Status = STATUS_NOT_SUPPORTED;
Irp->IoStatus.Information = IoStatusBlock.Information = 0;
+
+ /* Special case for IRP_MN_FILTER_RESOURCE_REQUIREMENTS */
+ if (IoStackLocation->MinorFunction == IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
+ {
+ /* Copy the resource requirements list into the IOSB */
+ Irp->IoStatus.Information =
+ IoStatusBlock.Information =
(ULONG_PTR)IoStackLocation->Parameters.FilterResourceRequirements.IoResourceRequirementList;
+ }
/* Initialize the event */
KeInitializeEvent(&Event, SynchronizationEvent, FALSE);