summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-07-17 16:55:42 +0200
committerGravatar Nikias Bassen2012-07-17 16:55:42 +0200
commitf9e12502816a548a70c5c1009dc08e248de18bee (patch)
treeef2ee2c7ae36b53e5ac0dc08c4ba59aee48eb57d /src
parentb51e3e5ae1de84ae6d16c933318689b6afcd1354 (diff)
downloadidevicerestore-f9e12502816a548a70c5c1009dc08e248de18bee.tar.gz
idevicerestore-f9e12502816a548a70c5c1009dc08e248de18bee.tar.bz2
mbn: move sig offset calculation to the right place
Diffstat (limited to 'src')
-rw-r--r--src/mbn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbn.c b/src/mbn.c
index b6bce0b..d6a54f2 100644
--- a/src/mbn.c
+++ b/src/mbn.c
@@ -55,11 +55,11 @@ void mbn_free(mbn_file* mbn)
int mbn_update_sig_blob(mbn_file* mbn, const unsigned char* sigdata, unsigned int siglen)
{
- mbn->parsed_sig_offset = mbn->parsed_size - siglen;
if (!mbn) {
error("ERROR: %s: no data\n", __func__);
return -1;
}
+ mbn->parsed_sig_offset = mbn->parsed_size - siglen;
if ((mbn->parsed_sig_offset + siglen) > mbn->parsed_size) {
error("ERROR: %s: signature is larger than mbn file size\n", __func__);
return -1;