sbtoelf: don't cross check if key is not valid
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30834 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cab5dbded9
commit
f45fb77664
1 changed files with 11 additions and 8 deletions
|
@ -538,15 +538,18 @@ static void extract(unsigned long filesize)
|
|||
/* cross-check or copy */
|
||||
if(valid_key && ok)
|
||||
memcpy(real_key, decrypted_key, 16);
|
||||
else if(valid_key && memcmp(real_key, decrypted_key, 16) == 0)
|
||||
else if(valid_key)
|
||||
{
|
||||
color(RED);
|
||||
printf(" Cross-Check Ok");
|
||||
}
|
||||
else
|
||||
{
|
||||
color(RED);
|
||||
printf(" Cross-Check Failed");
|
||||
if(memcmp(real_key, decrypted_key, 16) == 0)
|
||||
{
|
||||
color(RED);
|
||||
printf(" Cross-Check Ok");
|
||||
}
|
||||
else
|
||||
{
|
||||
color(RED);
|
||||
printf(" Cross-Check Failed");
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue