From af4959db72905e4c6a93b73879561d0c363b6dff Mon Sep 17 00:00:00 2001 From: Silent Date: Tue, 14 Mar 2017 01:31:18 +0100 Subject: [PATCH] Fix critical issue in Memory --- SilentPatch/MemoryMgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SilentPatch/MemoryMgr.h b/SilentPatch/MemoryMgr.h index ebc052f..d35301e 100644 --- a/SilentPatch/MemoryMgr.h +++ b/SilentPatch/MemoryMgr.h @@ -617,7 +617,7 @@ public: MEMORY_BASIC_INFORMATION MemoryInf; DWORD dwOldProtect; - VirtualQuery( (LPCVOID)VirtualAddress, &MemoryInf, sizeof(MemoryInf) ); + VirtualQuery( (LPCVOID)(VirtualAddress + QueriedSize), &MemoryInf, sizeof(MemoryInf) ); VirtualProtect( MemoryInf.BaseAddress, MemoryInf.RegionSize, PAGE_EXECUTE_READWRITE, &dwOldProtect ); m_queriedProtects.emplace_front( MemoryInf.BaseAddress, MemoryInf.RegionSize, MemoryInf.Protect ); QueriedSize += MemoryInf.RegionSize;