mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-26 12:12:02 +00:00
keys: don't look up a key entry if it's not mandatory.
This commit is contained in:
parent
f6d133d793
commit
376199b5cb
1 changed files with 6 additions and 2 deletions
|
@ -516,10 +516,14 @@ static bool keysRetrieveKeysFromProgramMemory(KeysMemoryInfo *info)
|
||||||
KeysMemoryKey *key = &(info->keys[i]);
|
KeysMemoryKey *key = &(info->keys[i]);
|
||||||
bool found = false, mandatory = (key->mandatory_func != NULL ? key->mandatory_func() : true);
|
bool found = false, mandatory = (key->mandatory_func != NULL ? key->mandatory_func() : true);
|
||||||
|
|
||||||
|
/* Skip key if it's not mandatory. */
|
||||||
|
if (!mandatory) continue;
|
||||||
|
|
||||||
|
/* Check destination pointer. */
|
||||||
if (!key->dst)
|
if (!key->dst)
|
||||||
{
|
{
|
||||||
LOG_MSG("Invalid destination pointer for key \"%s\" in program %016lX!", key->name, info->location.program_id);
|
LOG_MSG("Invalid destination pointer for key \"%s\" in program %016lX!", key->name, info->location.program_id);
|
||||||
if (mandatory) goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hash every key length-sized byte chunk in the process memory buffer until a match is found. */
|
/* Hash every key length-sized byte chunk in the process memory buffer until a match is found. */
|
||||||
|
@ -541,7 +545,7 @@ static bool keysRetrieveKeysFromProgramMemory(KeysMemoryInfo *info)
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
LOG_MSG("Unable to locate key \"%s\" in process memory from program %016lX!", key->name, info->location.program_id);
|
LOG_MSG("Unable to locate key \"%s\" in process memory from program %016lX!", key->name, info->location.program_id);
|
||||||
if (mandatory) goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue