summaryrefslogtreecommitdiffstats
path: root/src/mbn.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-17 17:15:39 +0200
committerGravatar Nikias Bassen2012-07-17 17:15:39 +0200
commitab06fe400e77b7ee9eab9328c1539a17d323c0a3 (patch)
treec67412dea27fa470d4dc9ce99d2df42bdeb7c04f /src/mbn.c
parentcab3c2cf81226b142e80e210106fedae571ef307 (diff)
downloadidevicerestore-ab06fe400e77b7ee9eab9328c1539a17d323c0a3.tar.gz
idevicerestore-ab06fe400e77b7ee9eab9328c1539a17d323c0a3.tar.bz2
mbn: Use real size instead of parsed size to fix iPad 3 baseband update
Diffstat (limited to 'src/mbn.c')
-rw-r--r--src/mbn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbn.c b/src/mbn.c
index d6a54f2..b7f4a45 100644
--- a/src/mbn.c
+++ b/src/mbn.c
@@ -59,8 +59,8 @@ int mbn_update_sig_blob(mbn_file* mbn, const unsigned char* sigdata, unsigned in
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) {
+ mbn->parsed_sig_offset = mbn->size - siglen;
+ if ((mbn->parsed_sig_offset + siglen) > mbn->size) {
error("ERROR: %s: signature is larger than mbn file size\n", __func__);
return -1;
}