diff options
| author | 2022-03-29 08:01:11 +0200 | |
|---|---|---|
| committer | 2022-03-29 08:08:20 +0200 | |
| commit | 02d4549205ced029014a1362519cb3ba67727c9b (patch) | |
| tree | 8a9b24d8aaab22bc89bd152702c6a561f7c42505 /tools | |
| parent | b200d5ebb327b127a4aacc7c629fdfbcffed7651 (diff) | |
| download | libimobiledevice-02d4549205ced029014a1362519cb3ba67727c9b.tar.gz libimobiledevice-02d4549205ced029014a1362519cb3ba67727c9b.tar.bz2 | |
idevicedebug: Gracefully fail on invalid bundle IDs
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicedebug.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c index 4169920..437faba 100644 --- a/tools/idevicedebug.c +++ b/tools/idevicedebug.c | |||
| @@ -334,9 +334,15 @@ int main(int argc, char *argv[]) | |||
| 334 | fprintf(stderr, "Could not start installation proxy service.\n"); | 334 | fprintf(stderr, "Could not start installation proxy service.\n"); |
| 335 | goto cleanup; | 335 | goto cleanup; |
| 336 | } | 336 | } |
| 337 | |||
| 338 | instproxy_client_get_path_for_bundle_identifier(instproxy_client, bundle_identifier, &path); | ||
| 339 | if (!path) { | ||
| 340 | fprintf(stderr, "Invalid bundle identifier: %s\n", bundle_identifier); | ||
| 341 | goto cleanup; | ||
| 342 | } | ||
| 343 | |||
| 337 | plist_t container = NULL; | 344 | plist_t container = NULL; |
| 338 | instproxy_client_get_object_by_key_from_info_dictionary_for_bundle_identifier(instproxy_client, bundle_identifier, "Container", &container); | 345 | instproxy_client_get_object_by_key_from_info_dictionary_for_bundle_identifier(instproxy_client, bundle_identifier, "Container", &container); |
| 339 | instproxy_client_get_path_for_bundle_identifier(instproxy_client, bundle_identifier, &path); | ||
| 340 | instproxy_client_free(instproxy_client); | 346 | instproxy_client_free(instproxy_client); |
| 341 | instproxy_client = NULL; | 347 | instproxy_client = NULL; |
| 342 | 348 | ||
