mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-01 23:12:35 +00:00
memory: Guard against OrbisProcParam without an OrbisKernelMemParam.
This commit is contained in:
parent
ca9360a865
commit
f48b92eefd
@ -68,9 +68,17 @@ void Linker::Execute() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Configure used flexible memory size.
|
// Configure used flexible memory size.
|
||||||
if (auto* mem_param = GetProcParam()->mem_param) {
|
if (const auto* proc_param = GetProcParam()) {
|
||||||
if (u64* flexible_size = mem_param->flexible_memory_size) {
|
if (proc_param->size >=
|
||||||
memory->SetupMemoryRegions(*flexible_size);
|
offsetof(OrbisProcParam, mem_param) + sizeof(OrbisKernelMemParam*)) {
|
||||||
|
if (const auto* mem_param = proc_param->mem_param) {
|
||||||
|
if (mem_param->size >=
|
||||||
|
offsetof(OrbisKernelMemParam, flexible_memory_size) + sizeof(u64*)) {
|
||||||
|
if (const auto* flexible_size = mem_param->flexible_memory_size) {
|
||||||
|
memory->SetupMemoryRegions(*flexible_size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user