Author: tfaber
Date: Tue Apr 28 07:07:57 2015
New Revision: 67464
URL:
http://svn.reactos.org/svn/reactos?rev=67464&view=rev
Log:
[NTOS:MM]
- Consistently return STATUS_INVALID_IMAGE_PROTECT from PeFmtCreateSection if the PE
signature is missing. Patch by V.
CORE-9618 #resolve
Modified:
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Tue Apr 28 07:07:57 2015
@@ -330,11 +330,13 @@
{
ULONG cbOptHeaderOffsetSize = 0;
- nStatus = STATUS_INVALID_IMAGE_FORMAT;
+ nStatus = STATUS_INVALID_IMAGE_PROTECT;
/* don't trust an invalid NT header */
if(pinhNtHeader->Signature != IMAGE_NT_SIGNATURE)
DIE(("The file isn't a PE executable, Signature is %X\n",
pinhNtHeader->Signature));
+
+ nStatus = STATUS_INVALID_IMAGE_FORMAT;
if(!Intsafe_AddULong32(&cbOptHeaderOffsetSize, pidhDosHeader->e_lfanew,
FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader)))
DIE(("The DOS stub is too large, e_lfanew is %X\n",
pidhDosHeader->e_lfanew));