mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 23:16:41 +00:00
Report unexpected export sizes too.
This commit is contained in:
parent
4e8958f42d
commit
a9557a8297
@ -704,6 +704,7 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, std::string *erro
|
|||||||
u8 vcount;
|
u8 vcount;
|
||||||
u16_le fcount;
|
u16_le fcount;
|
||||||
u32_le resident;
|
u32_le resident;
|
||||||
|
u32_le extra;
|
||||||
};
|
};
|
||||||
|
|
||||||
u32_le *entPos = (u32_le *)Memory::GetPointer(modinfo->libent);
|
u32_le *entPos = (u32_le *)Memory::GetPointer(modinfo->libent);
|
||||||
@ -738,6 +739,10 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, std::string *erro
|
|||||||
u32_le *residentPtr = (u32_le *)Memory::GetPointer(ent->resident);
|
u32_le *residentPtr = (u32_le *)Memory::GetPointer(ent->resident);
|
||||||
u32_le *exportPtr = residentPtr + ent->fcount + ent->vcount;
|
u32_le *exportPtr = residentPtr + ent->fcount + ent->vcount;
|
||||||
|
|
||||||
|
if (ent->size != 4) {
|
||||||
|
WARN_LOG_REPORT(LOADER, "Unexpected export module entry size %d, extra=%08x", ent->size, ent->extra);
|
||||||
|
}
|
||||||
|
|
||||||
for (u32 j = 0; j < ent->fcount; j++) {
|
for (u32 j = 0; j < ent->fcount; j++) {
|
||||||
u32 nid = residentPtr[j];
|
u32 nid = residentPtr[j];
|
||||||
u32 exportAddr = exportPtr[j];
|
u32 exportAddr = exportPtr[j];
|
||||||
|
Loading…
Reference in New Issue
Block a user