mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Update last commit to use IsValidRange instead of IsValidAddress.
This commit is contained in:
1 parent
8a6a494599
commit
29950c0ad5
1 file changed
+5
-5
@@ -1274,13 +1274,13 @@ static Module *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 loadAdd
|
||||
std::vector<SectionID> codeSections = reader.GetCodeSections();
|
||||
for (SectionID id : codeSections) {
|
||||
u32 start = reader.GetSectionAddr(id);
|
||||
if (!Memory::IsValidAddress(start)) {
|
||||
ERROR_LOG(LOADER, "Bad section addr %08x of section %d", start, id);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Note: scan end is inclusive.
|
||||
u32 end = start + reader.GetSectionSize(id) - 4;
|
||||
u32 len = end + 4 - start;
|
||||
if (!Memory::IsValidRange(start, len)) {
|
||||
ERROR_LOG(LOADER, "Bad section %08x (len %08x) of section %d", start, len, id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (start < module->textStart)
|
||||
module->textStart = start;
|
||||
|
||||
Reference in new issue
Block a user