From 4f64e3e937dd3665416178721ae7a29151f93906 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 2 Feb 2019 01:02:38 +0100 Subject: Don't allow passing an empty UDID with --udid --- src/idevicerestore.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/idevicerestore.c b/src/idevicerestore.c index ed8e5cf..3ebee61 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -1202,6 +1202,11 @@ int main(int argc, char* argv[]) { break; case 'u': + if (!*optarg) { + error("ERROR: UDID must not be empty!\n"); + usage(argc, argv); + return -1; + } client->udid = strdup(optarg); break; -- cgit v1.1-32-gdbae