mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Code analysis: Skip invalid code sections. May help #12414.
This commit is contained in:
parent
94339b2280
commit
d64f9c44f3
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue