From 5231462b8a7716800f9cb129a58f9ba120cda88a Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 7 Feb 2012 00:12:17 +0100 Subject: main: remove static wtf hash padding (now handled by libirecovery) --- src/idevicerestore.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src') 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]; } -- cgit v1.1-32-gdbae