Memory: remove IsValidVirtualAddress with current process

This commit is contained in:
Weiyi Wang
2018-11-19 11:16:55 -05:00
parent 36cf104a02
commit 7308b8d294
4 changed files with 7 additions and 10 deletions
+4 -2
View File
@@ -830,7 +830,8 @@ static void ReadMemory() {
SendReply("E01");
}
if (!Memory::IsValidVirtualAddress(addr)) {
if (!Memory::IsValidVirtualAddress(*Core::System::GetInstance().Kernel().GetCurrentProcess(),
addr)) {
return SendReply("E00");
}
@@ -852,7 +853,8 @@ static void WriteMemory() {
auto len_pos = std::find(start_offset, command_buffer + command_length, ':');
u32 len = HexToInt(start_offset, static_cast<u32>(len_pos - start_offset));
if (!Memory::IsValidVirtualAddress(addr)) {
if (!Memory::IsValidVirtualAddress(*Core::System::GetInstance().Kernel().GetCurrentProcess(),
addr)) {
return SendReply("E00");
}