summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar zhangbo2021-09-06 14:43:54 +0800
committerGravatar Nikias Bassen2023-07-21 03:50:50 +0700
commitfaafec8be9633f71ba54d3ee9028a76db243b024 (patch)
tree244fcb44de4e1a8949012c695d66193f27500f23 /src
parent7ae455ff186ebc58db025ab5a0f260a1b090bb58 (diff)
downloadideviceinstaller-faafec8be9633f71ba54d3ee9028a76db243b024.tar.gz
ideviceinstaller-faafec8be9633f71ba54d3ee9028a76db243b024.tar.bz2
Fix get wrong app directory from zip/ipa when there are other directory, taking "OnDemandResources" for example
Diffstat (limited to 'src')
-rw-r--r--src/ideviceinstaller.c6
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;