From 45058a2e2cff5ebafbe652c736ccf75094c8a1b9 Mon Sep 17 00:00:00 2001 From: tihmstar Date: Thu, 30 Mar 2017 14:38:52 +0200 Subject: [PATCH] added error handling when loading shsh files fails --- futurerestore/futurerestore.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/futurerestore/futurerestore.cpp b/futurerestore/futurerestore.cpp index 36be0e3c..fda7aeff 100644 --- a/futurerestore/futurerestore.cpp +++ b/futurerestore/futurerestore.cpp @@ -274,6 +274,9 @@ void futurerestore::loadAPTickets(const vector &apticketPaths){ uint64_t im4msize=0; plist_get_data_val(ticket, &im4m, &im4msize); + if (!im4msize) + reterror(-38, "Error: failed to load shsh file %s\n",apticketPath); + _im4ms.push_back(im4m); _aptickets.push_back(apticket); printf("reading ticket %s done\n",apticketPath);