diff --git a/futurerestore/futurerestore.cpp b/futurerestore/futurerestore.cpp index 97ce31c3..304c62b2 100644 --- a/futurerestore/futurerestore.cpp +++ b/futurerestore/futurerestore.cpp @@ -202,8 +202,8 @@ void futurerestore::loadAPTickets(const vector &apticketPaths){ size_t fSize = ftell(f); fseek(f, 0, SEEK_SET); - char *buf = (char*)malloc(fSize); - memset(buf, 0, fSize); + char *buf = (char*)malloc(fSize+1); + memset(buf, 0, fSize+1); fread(buf, fSize, 1, f); fclose(f); @@ -222,6 +222,7 @@ void futurerestore::loadAPTickets(const vector &apticketPaths){ _im4ms.push_back(im4m); _aptickets.push_back(apticket); + printf("reading ticket %s done\n",apticketPath); } } diff --git a/futurerestore/main.cpp b/futurerestore/main.cpp index 16c95e95..d4d7194b 100644 --- a/futurerestore/main.cpp +++ b/futurerestore/main.cpp @@ -22,7 +22,7 @@ static struct option longopts[] = { { "apticket", required_argument, NULL, 't' }, { "baseband", required_argument, NULL, 'b' }, - { "baseband-plist", required_argument, NULL, 'p' }, + { "baseband-manifest", required_argument, NULL, 'p' }, { "sep", required_argument, NULL, 's' }, { "sep-manifest", required_argument, NULL, 'm' }, { "wait", no_argument, NULL, 'w' }, @@ -76,10 +76,8 @@ int main(int argc, const char * argv[]) { vector apticketPaths; - t_devicevals devVals; - t_iosVersion versVals; - memset(&devVals, 0, sizeof(devVals)); - memset(&versVals, 0, sizeof(versVals)); + t_devicevals devVals = {0}; + t_iosVersion versVals = {0}; if (argc == 1){ cmd_help(); @@ -133,6 +131,8 @@ int main(int argc, const char * argv[]) { futurerestore client; if (!client.init()) reterror(-3,"can't init, no device found\n"); + printf("futurerestore init done\n"); + try { if (apticketPaths.size()) client.loadAPTickets(apticketPaths); @@ -168,6 +168,8 @@ int main(int argc, const char * argv[]) { client.setBasebandManifestPath(basebandManifestPath); } + printf("Did set sep+baseband path and firmware\n"); + versVals.basebandMode = kBasebandModeWithoutBaseband; if (!(isSepManifestSigned = isManifestSignedForDevice(client.sepManifestPath(), &devVals, &versVals))){