Author: tfaber
Date: Tue Aug 5 18:47:25 2014
New Revision: 63812
URL:
http://svn.reactos.org/svn/reactos?rev=63812&view=rev
Log:
[NTOS:IO]
- Fail with the correct status code if MDL allocation fails
CORE-8410
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iofunc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iofunc.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iofunc.c [iso-8859-1] Tue Aug 5 18:47:25 2014
@@ -2350,6 +2350,8 @@
{
/* Allocate an MDL */
Mdl = IoAllocateMdl(Buffer, Length, FALSE, TRUE, Irp);
+ if (!Mdl)
+ ExRaiseStatus(STATUS_INSUFFICIENT_RESOURCES);
MmProbeAndLockPages(Mdl, PreviousMode, IoWriteAccess);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
@@ -3269,6 +3271,8 @@
{
/* Allocate an MDL */
Mdl = IoAllocateMdl(Buffer, Length, FALSE, TRUE, Irp);
+ if (!Mdl)
+ ExRaiseStatus(STATUS_INSUFFICIENT_RESOURCES);
MmProbeAndLockPages(Mdl, PreviousMode, IoReadAccess);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)