1
0
Fork 0

DBG: remove a check that has been proven stable in MemoryReadSafePage

This commit is contained in:
Duncan Ogilvie 2020-04-28 00:25:50 +02:00
parent 1d5766e8bc
commit 8dd8026d55
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 2 additions and 0 deletions

View File

@ -337,10 +337,12 @@ static bool IgnoreThisRead(HANDLE hProcess, LPVOID lpBaseAddress, LPVOID lpBuffe
bool MemoryReadSafePage(HANDLE hProcess, LPVOID lpBaseAddress, LPVOID lpBuffer, SIZE_T nSize, SIZE_T* lpNumberOfBytesRead)
{
#if 0
//TODO: remove when proven stable, this function checks if reads are always within page boundaries
auto base = duint(lpBaseAddress);
if(nSize > PAGE_SIZE - (base & (PAGE_SIZE - 1)))
__debugbreak();
#endif
if(IgnoreThisRead(hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead))
return true;
return MemoryReadSafe(hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead);