mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[NTOS:MM] PeFmtCreateSection(): Improve AMD64 image failure case
Addendum to 98638cc2df
.
CORE-15981
This commit is contained in:
parent
38db074491
commit
cf27695269
1 changed files with 9 additions and 10 deletions
|
@ -358,18 +358,17 @@ l_ReadHeaderFromFile:
|
|||
|
||||
switch(piohOptHeader->Magic)
|
||||
{
|
||||
case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
|
||||
#ifdef _WIN64
|
||||
case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
|
||||
#endif // _WIN64
|
||||
break;
|
||||
|
||||
case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
|
||||
#ifndef _WIN64
|
||||
case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
|
||||
nStatus = STATUS_INVALID_IMAGE_WIN_64;
|
||||
nStatus = STATUS_INVALID_IMAGE_WIN_64;
|
||||
DIE(("Win64 optional header, unsupported\n"));
|
||||
#else
|
||||
// Fall through.
|
||||
#endif
|
||||
default:
|
||||
DIE(("Unrecognized optional header, Magic is %X\n", piohOptHeader->Magic));
|
||||
case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
|
||||
break;
|
||||
default:
|
||||
DIE(("Unrecognized optional header, Magic is %X\n", piohOptHeader->Magic));
|
||||
}
|
||||
|
||||
if (RTL_CONTAINS_FIELD(piohOptHeader, cbOptHeaderSize, SectionAlignment) &&
|
||||
|
|
Loading…
Reference in a new issue