Author: tkreuzer Date: Mon Feb 6 00:29:50 2012 New Revision: 55446
URL: http://svn.reactos.org/svn/reactos?rev=55446&view=rev Log: [NTOSKRNL] In PeFmtCreateSection don't use the ImageBase field of the ImageOptionalHeader directly, since it's different between PE32 and PE64. Use the ImageSectionObject->ImageBase field instead, which already contains the correct value.
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=5... ============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Mon Feb 6 00:29:50 2012 @@ -402,7 +402,7 @@ break; }
- /* PE32+ */ + /* PE64 */ case IMAGE_NT_OPTIONAL_HDR64_MAGIC: { const IMAGE_OPTIONAL_HEADER64 * pioh64OptHeader; @@ -463,7 +463,7 @@
if(RTL_CONTAINS_FIELD(piohOptHeader, cbOptHeaderSize, AddressOfEntryPoint)) { - ImageSectionObject->EntryPoint = piohOptHeader->ImageBase + + ImageSectionObject->EntryPoint = ImageSectionObject->ImageBase + piohOptHeader->AddressOfEntryPoint; }