mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-21 14:16:03 -04:00
use correct size for sections that have no raw size defined but define their data size
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user