Somewhat better check to prevent some homebrew from loading into kernel memory.

This commit is contained in:
Henrik Rydgard committed 2015-07-02 23:07:07 +02:00
1 parent a9ba755dde
commit bb57aa69d1
1 file changed
+1 -1
+1 -1
View File
@@ -415,7 +415,7 @@ int ElfReader::LoadInto(u32 loadAddress, bool fromTop)
totalSize = totalEnd - totalStart;
// If a load address is specified that's in regular RAM, override kernel module status
bool inUser = totalStart > 0x08900000;
bool inUser = totalStart >= PSP_GetUserMemoryBase();
BlockAllocator &memblock = (kernelModule && !inUser) ? kernelMemory : userMemory;
if (!bRelocate)