summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-02-07 00:12:17 +0100
committerGravatar Nikias Bassen2012-02-07 00:12:17 +0100
commit5231462b8a7716800f9cb129a58f9ba120cda88a (patch)
tree2ccbbdb3f09db1aa8d42f8ee6d0228793c3a7ba9 /src/idevicerestore.c
parent28a7e48baaa20638c1b361188277e559303472fa (diff)
downloadidevicerestore-5231462b8a7716800f9cb129a58f9ba120cda88a.tar.gz
idevicerestore-5231462b8a7716800f9cb129a58f9ba120cda88a.tar.bz2
main: remove static wtf hash padding (now handled by libirecovery)
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 4efc0d4..2ecf0fb 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -262,27 +262,16 @@ int main(int argc, char* argv[]) {
ipsw_extract_to_memory(wtfipsw, wtfname, &wtftmp, &wtfsize);
if (!wtftmp) {
error("ERROR: Could not extract WTF\n");
- }
-
- char xbuf[16] = {0xff, 0xff, 0xff, 0xff, 0xac, 0x05, 0x00, 0x01, 0x55, 0x46, 0x44, 0x10, 0xcb, 0x55, 0xa4, 0x05};
- char *wtfbuf = (char*)malloc(wtfsize + 16);
- if (!wtfbuf) {
- error("ERROR: Out of Memory\n");
- return -1;
- }
- memcpy(wtfbuf, wtftmp, wtfsize);
- free(wtftmp);
- memcpy(wtfbuf+wtfsize, xbuf, 16);
- wtfsize += 16;
-
- if (dfu_send_buffer(client, wtfbuf, wtfsize) != 0) {
- error("ERROR: Could not send WTF...\n");
+ } else {
+ if (dfu_send_buffer(client, wtftmp, wtfsize) != 0) {
+ error("ERROR: Could not send WTF...\n");
+ }
}
dfu_client_free(client);
sleep(1);
- free(wtfbuf);
+ free(wtftmp);
client->mode = &idevicerestore_modes[MODE_DFU];
}