mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Merge pull request #12418 from hrydgard/skip-invalid-code-sections
ScanForFunctions: Skip invalid code sections. May help #12414.
This commit is contained in:
commit
8a6a494599
@ -1274,6 +1274,11 @@ 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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user