diff options
author | zhangbo | 2021-09-06 14:43:54 +0800 |
---|---|---|
committer | Nikias Bassen | 2023-07-21 03:50:50 +0700 |
commit | faafec8be9633f71ba54d3ee9028a76db243b024 (patch) | |
tree | 244fcb44de4e1a8949012c695d66193f27500f23 | |
parent | 7ae455ff186ebc58db025ab5a0f260a1b090bb58 (diff) | |
download | ideviceinstaller-faafec8be9633f71ba54d3ee9028a76db243b024.tar.gz ideviceinstaller-faafec8be9633f71ba54d3ee9028a76db243b024.tar.bz2 |
Fix get wrong app directory from zip/ipa when there are other directory, taking "OnDemandResources" for example
-rw-r--r-- | src/ideviceinstaller.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index e5c36ef..33737b9 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c @@ -355,6 +355,12 @@ static int zip_get_app_directory(struct zip* zf, char** path) len = p - name + 1; + /* make sure app directory endwith .app */ + if (len < 12 || strncmp(p - 4, ".app", 4)) + { + continue; + } + if (path != NULL) { free(*path); *path = NULL; |