use correct size for sections that have no raw size defined but define their data size

This commit is contained in:
Joachim Bauch
2010-10-24 22:19:26 +02:00
parent 178ea7363c
commit 9e480a552e
+1 -1
View File
@@ -162,7 +162,7 @@ FinalizeSections(PMEMORYMODULE module)
if (size > 0) {
// change memory access flags
if (VirtualProtect((LPVOID)((POINTER_TYPE)section->Misc.PhysicalAddress | imageOffset), section->SizeOfRawData, protect, &oldProtect) == 0)
if (VirtualProtect((LPVOID)((POINTER_TYPE)section->Misc.PhysicalAddress | imageOffset), size, protect, &oldProtect) == 0)
#ifdef DEBUG_OUTPUT
OutputLastError("Error protecting memory page")
#endif