mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 03:47:33 +01:00
am: avoid direct pointer access of transfer memory objects
This commit is contained in:
parent
de4e5db330
commit
975186ad4d
@ -1260,9 +1260,8 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u8* const mem_begin = system.Memory().GetPointer(transfer_mem->GetSourceAddress());
|
std::vector<u8> memory(transfer_mem->GetSize());
|
||||||
const u8* const mem_end = mem_begin + transfer_mem->GetSize();
|
system.Memory().ReadBlock(transfer_mem->GetSourceAddress(), memory.data(), memory.size());
|
||||||
std::vector<u8> memory{mem_begin, mem_end};
|
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
@ -1294,9 +1293,8 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u8* const mem_begin = system.Memory().GetPointer(transfer_mem->GetSourceAddress());
|
std::vector<u8> memory(transfer_mem->GetSize());
|
||||||
const u8* const mem_end = mem_begin + transfer_mem->GetSize();
|
system.Memory().ReadBlock(transfer_mem->GetSourceAddress(), memory.data(), memory.size());
|
||||||
std::vector<u8> memory{mem_begin, mem_end};
|
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
Loading…
Reference in New Issue
Block a user