[Kernel/Memory] MmQueryAddressProtect - Check for protect_bits equals 0
This commit is contained in:
parent
8749ca2260
commit
aae292aab5
|
@ -401,6 +401,11 @@ DECLARE_XBOXKRNL_EXPORT2(MmQueryAddressProtect, kMemory, kImplemented,
|
|||
|
||||
void MmSetAddressProtect(lpvoid_t base_address, dword_t region_size,
|
||||
dword_t protect_bits) {
|
||||
if (!protect_bits) {
|
||||
XELOGE("MmSetAddressProtect: Failed due to incorrect protect_bits");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t protect = FromXdkProtectFlags(protect_bits);
|
||||
auto heap = kernel_memory()->LookupHeap(base_address);
|
||||
heap->Protect(base_address.guest_address(), region_size, protect);
|
||||
|
|
Loading…
Reference in New Issue