mirror of
https://github.com/XWine1/SlimEra.git
synced 2026-07-24 12:32:28 -07:00
Fix bounds check in MappableQuery
This commit is contained in:
@@ -145,6 +145,13 @@ static LPVOID MappableQuery(_In_opt_ LPCVOID lpAddress, _Out_ PMAPPABLE_MEM pMap
|
||||
}
|
||||
|
||||
--it;
|
||||
|
||||
if (it->first + it->second.RegionSize <= (ULONG_PTR)lpAddress)
|
||||
{
|
||||
*pMappable = {};
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
*pMappable = it->second;
|
||||
return (LPVOID)it->first;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user