summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-02-02 01:02:38 +0100
committerGravatar Nikias Bassen2019-02-02 01:02:38 +0100
commit4f64e3e937dd3665416178721ae7a29151f93906 (patch)
tree4b76601a62f7c92184c38476420fd7cba741a686 /src/idevicerestore.c
parent519af01f7dcb448b59ca13bdc1a1b060484f41ec (diff)
downloadidevicerestore-4f64e3e937dd3665416178721ae7a29151f93906.tar.gz
idevicerestore-4f64e3e937dd3665416178721ae7a29151f93906.tar.bz2
Don't allow passing an empty UDID with --udid
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c5
1 files changed, 5 insertions, 0 deletions
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;