Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MemoryModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ PerformBaseRelocation(PMEMORYMODULE module, ptrdiff_t delta)
}
}

// flush instruction cache to avoid executing stale code after performing relocations
FlushInstructionCache(GetCurrentProcess(), (LPCVOID) dest, module->pageSize);
// advance to next relocation block
relocation = (PIMAGE_BASE_RELOCATION) OffsetPointer(relocation, relocation->SizeOfBlock);
}
Expand Down