mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[NTOS:MM]
- Consistently return STATUS_INVALID_IMAGE_PROTECT from PeFmtCreateSection if the PE signature is missing. Patch by V. CORE-9618 #resolve svn path=/trunk/; revision=67464
This commit is contained in:
parent
12c22c7748
commit
22d49c5df5
1 changed files with 3 additions and 1 deletions
|
@ -330,12 +330,14 @@ l_ReadHeaderFromFile:
|
|||
{
|
||||
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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue