summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-10-23 18:19:21 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-10-23 18:19:21 +0000
commitf45fb77664ea1c00e444e1b71499af9bc159ffb9 (patch)
treef992cf50fe7d8c1ebd287c22290dfe189820b8d3 /utils
parentcab5dbded9bb4003113e2dbae5a7dcd5f9524f29 (diff)
downloadrockbox-f45fb77664ea1c00e444e1b71499af9bc159ffb9.tar.gz
rockbox-f45fb77664ea1c00e444e1b71499af9bc159ffb9.tar.bz2
rockbox-f45fb77664ea1c00e444e1b71499af9bc159ffb9.zip
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
Diffstat (limited to 'utils')
-rw-r--r--utils/sbtools/sbtoelf.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c
index 44f6e074da..66deb6c0ab 100644
--- a/utils/sbtools/sbtoelf.c
+++ b/utils/sbtools/sbtoelf.c
@@ -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");
}