summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2015-10-09 02:32:45 +0200
committerGravatar Nikias Bassen2015-10-09 02:32:45 +0200
commit54d97a24791dfa879dc2c47092e99e234ecb2952 (patch)
tree9cf2085612f5dc2a9f2efc57ac6b355e1bf7adef /src
parent0d3094c474d361ada6d1cd3cc469b889773a8712 (diff)
downloadidevicerestore-54d97a24791dfa879dc2c47092e99e234ecb2952.tar.gz
idevicerestore-54d97a24791dfa879dc2c47092e99e234ecb2952.tar.bz2
restore: Fix segfault when .bbfw file contains files without extension
Diffstat (limited to 'src')
-rw-r--r--src/restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/restore.c b/src/restore.c
index 07baec5..f7b854c 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -1232,7 +1232,7 @@ static int restore_sign_bbfw(const char* bbfwtmp, plist_t bbtss, const unsigned
const char* fn = zip_get_name(za, i, 0);
if (fn) {
char* ext = strrchr(fn, '.');
- if (strcmp(ext, ".fls") == 0 || strcmp(ext, ".mbn") == 0) {
+ if (ext && (strcmp(ext, ".fls") == 0 || strcmp(ext, ".mbn") == 0)) {
skip = 1;
}
}