Fix bounds check in MappableQuery

This commit is contained in:
Benjamin Moir
2025-07-07 04:12:16 +10:00
parent a9c0986fb2
commit 8ed08befcb
+7
View File
@@ -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;
}