mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Merge pull request #7506 from elad335/patch-1
PPU exec/ovlm ldr: restrict allocations
This commit is contained in:
commit
e133c7a7dc
1 changed files with 2 additions and 2 deletions
|
@ -1085,7 +1085,7 @@ void ppu_load_exec(const ppu_exec_object& elf)
|
|||
if (prog.bin.size() > size || prog.bin.size() != prog.p_filesz)
|
||||
fmt::throw_exception("Invalid binary size (0x%llx, memsz=0x%x)", prog.bin.size(), size);
|
||||
|
||||
if (!vm::falloc(addr, size))
|
||||
if (!vm::falloc(addr, size, vm::main))
|
||||
fmt::throw_exception("vm::falloc() failed (addr=0x%x, memsz=0x%x)", addr, size);
|
||||
|
||||
// Copy segment data, hash it
|
||||
|
@ -1655,7 +1655,7 @@ std::shared_ptr<lv2_overlay> ppu_load_overlay(const ppu_exec_object& elf, const
|
|||
if (prog.bin.size() > size || prog.bin.size() != prog.p_filesz)
|
||||
fmt::throw_exception("Invalid binary size (0x%llx, memsz=0x%x)", prog.bin.size(), size);
|
||||
|
||||
if (!vm::falloc(addr, size))
|
||||
if (!vm::get(vm::any, 0x30000000)->falloc(addr, size))
|
||||
fmt::throw_exception("vm::falloc() failed (addr=0x%x, memsz=0x%x)", addr, size);
|
||||
|
||||
// Copy segment data, hash it
|
||||
|
|
Loading…
Add table
Reference in a new issue