Fix critical issue in Memory

This commit is contained in:
Silent 2017-03-14 01:31:18 +01:00
parent c05a89d18a
commit af4959db72

View File

@ -617,7 +617,7 @@ public:
MEMORY_BASIC_INFORMATION MemoryInf; MEMORY_BASIC_INFORMATION MemoryInf;
DWORD dwOldProtect; DWORD dwOldProtect;
VirtualQuery( (LPCVOID)VirtualAddress, &MemoryInf, sizeof(MemoryInf) ); VirtualQuery( (LPCVOID)(VirtualAddress + QueriedSize), &MemoryInf, sizeof(MemoryInf) );
VirtualProtect( MemoryInf.BaseAddress, MemoryInf.RegionSize, PAGE_EXECUTE_READWRITE, &dwOldProtect ); VirtualProtect( MemoryInf.BaseAddress, MemoryInf.RegionSize, PAGE_EXECUTE_READWRITE, &dwOldProtect );
m_queriedProtects.emplace_front( MemoryInf.BaseAddress, MemoryInf.RegionSize, MemoryInf.Protect ); m_queriedProtects.emplace_front( MemoryInf.BaseAddress, MemoryInf.RegionSize, MemoryInf.Protect );
QueriedSize += MemoryInf.RegionSize; QueriedSize += MemoryInf.RegionSize;