mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Fix minor overallocation during elf loading
This commit is contained in:
1 parent
ae9451694e
commit
57a20f02ed
1 file changed
+3
-6
@@ -1080,12 +1080,9 @@ static Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, bool fromT
|
||||
}
|
||||
|
||||
const u8 *in = ptr;
|
||||
u32 size = head->elf_size;
|
||||
if (head->psp_size > size)
|
||||
{
|
||||
size = head->psp_size;
|
||||
}
|
||||
newptr = new u8[head->elf_size + head->psp_size];
|
||||
// Kind of odd.
|
||||
u32 size = std::max(head->elf_size, head->psp_size);
|
||||
newptr = new u8[size];
|
||||
ptr = newptr;
|
||||
magicPtr = (u32_le *)ptr;
|
||||
int ret = pspDecryptPRX(in, (u8*)ptr, head->psp_size);
|
||||
|
||||
Reference in new issue
Block a user