From 02d4549205ced029014a1362519cb3ba67727c9b Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Tue, 29 Mar 2022 08:01:11 +0200 Subject: idevicedebug: Gracefully fail on invalid bundle IDs --- tools/idevicedebug.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/idevicedebug.c') 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[]) fprintf(stderr, "Could not start installation proxy service.\n"); goto cleanup; } + + instproxy_client_get_path_for_bundle_identifier(instproxy_client, bundle_identifier, &path); + if (!path) { + fprintf(stderr, "Invalid bundle identifier: %s\n", bundle_identifier); + goto cleanup; + } + plist_t container = NULL; instproxy_client_get_object_by_key_from_info_dictionary_for_bundle_identifier(instproxy_client, bundle_identifier, "Container", &container); - instproxy_client_get_path_for_bundle_identifier(instproxy_client, bundle_identifier, &path); instproxy_client_free(instproxy_client); instproxy_client = NULL; -- cgit v1.1-32-gdbae