From 0b14382adf7648ecb0702b7696cbb2a0887c34c7 Mon Sep 17 00:00:00 2001 From: tihmstar Date: Sat, 25 Mar 2017 12:08:32 +0100 Subject: [PATCH] trying to fix segfault 11, updated img4tool dependency --- external/img4tool | 2 +- futurerestore/futurerestore.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/external/img4tool b/external/img4tool index 8b32c5ce..438cbe96 160000 --- a/external/img4tool +++ b/external/img4tool @@ -1 +1 @@ -Subproject commit 8b32c5ce738564bae01f08ff9285e5b3ed8a51f1 +Subproject commit 438cbe966817b766afd6373affc5cb0aef4ff4f3 diff --git a/futurerestore/futurerestore.cpp b/futurerestore/futurerestore.cpp index 46e83ba1..e4d8551a 100644 --- a/futurerestore/futurerestore.cpp +++ b/futurerestore/futurerestore.cpp @@ -343,7 +343,8 @@ int futurerestore::doRestore(const char *ipsw, bool noerase){ plist_t manifest = plist_dict_get_item(build_identity, "Manifest"); printf("checking APTicket to be valid for this restore...\n"); - plist_t ticketIdentity = getBuildIdentityForIM4M(nonceMatchesIM4Ms(), buildmanifest); + const char * im4m = nonceMatchesIM4Ms(); + plist_t ticketIdentity = getBuildIdentityForIM4M(im4m, buildmanifest); //TODO: make this nicer! //for now a simple pointercompare should be fine, because both plist_t should point into the same buildidentity inside the buildmanifest @@ -360,7 +361,7 @@ int futurerestore::doRestore(const char *ipsw, bool noerase){ } reterror(-44, "APTicket can't be used for this restore\n"); }else{ - if (verifyIM4MSignature(nonceMatchesIM4Ms())){ + if (verifyIM4MSignature(im4m)){ printf("IM4M signature is not valid!\n"); reterror(-44, "APTicket can't be used for this restore\n"); }