mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 15:13:37 +02:00
Merge pull request #17435 from hrydgard/wwe-scan-functions-fix
ElfLoader: Don't scan for functions in zero-length sections
This commit is contained in:
@@ -1412,6 +1412,10 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
|
||||
// Note: scan end is inclusive.
|
||||
u32 end = start + reader.GetSectionSize(id) - 4;
|
||||
u32 len = end + 4 - start;
|
||||
if (len == 0) {
|
||||
// Seen in WWE: Smackdown vs Raw 2009. See #17435.
|
||||
continue;
|
||||
}
|
||||
if (!Memory::IsValidRange(start, len)) {
|
||||
ERROR_LOG(LOADER, "Bad section %08x (len %08x) of section %d", start, len, id);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user