diff options
| author | 2021-09-06 14:43:54 +0800 | |
|---|---|---|
| committer | 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) | |||
| 355 | 355 | ||
| 356 | len = p - name + 1; | 356 | len = p - name + 1; |
| 357 | 357 | ||
| 358 | /* make sure app directory endwith .app */ | ||
| 359 | if (len < 12 || strncmp(p - 4, ".app", 4)) | ||
| 360 | { | ||
| 361 | continue; | ||
| 362 | } | ||
| 363 | |||
| 358 | if (path != NULL) { | 364 | if (path != NULL) { |
| 359 | free(*path); | 365 | free(*path); |
| 360 | *path = NULL; | 366 | *path = NULL; |
