mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[NTOS:MM] VirtualSize overrides SizeOfRawData when mapping PE files. CORE-17284
This fixes the related failures in ntdll_apitest:NtMapViewOfSection as well as loading of OrgPlayer's DragDrop.ocx.
This commit is contained in:
parent
9b1fb8d6fd
commit
b957af4b6b
1 changed files with 1 additions and 1 deletions
|
@ -754,7 +754,7 @@ l_ReadHeaderFromFile:
|
|||
pssSegments[i].Protection = SectionCharacteristicsToProtect[nCharacteristics >> 28];
|
||||
pssSegments[i].WriteCopy = !(nCharacteristics & IMAGE_SCN_MEM_SHARED);
|
||||
|
||||
if(pishSectionHeaders[i].Misc.VirtualSize == 0 || pishSectionHeaders[i].Misc.VirtualSize < pishSectionHeaders[i].SizeOfRawData)
|
||||
if(pishSectionHeaders[i].Misc.VirtualSize == 0)
|
||||
pssSegments[i].Length.QuadPart = pishSectionHeaders[i].SizeOfRawData;
|
||||
else
|
||||
pssSegments[i].Length.QuadPart = pishSectionHeaders[i].Misc.VirtualSize;
|
||||
|
|
Loading…
Reference in a new issue