mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user