mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix using incorrect member as bounds for looping exporteds
Fixes a crasher on certain modules as it could read oob; must use 'NumberOfNames' to iterate over export names.
This commit is contained in:
parent
af81954b7f
commit
2b05edd374
@ -120,7 +120,7 @@ CMemory CModule::GetExportedSymbol(QWORD pModuleBase, const char* szSymbolName)
|
||||
if (!pAddressOfOrdinals)
|
||||
return nullptr;
|
||||
|
||||
for (DWORD i = 0; i < pImageExportDirectory->NumberOfFunctions; i++)
|
||||
for (DWORD i = 0; i < pImageExportDirectory->NumberOfNames; i++)
|
||||
{
|
||||
// Get virtual relative Address of the function name,
|
||||
// then add module base Address to get the actual location.
|
||||
|
Loading…
x
Reference in New Issue
Block a user