diff options
author | Nikias Bassen | 2012-11-29 03:42:06 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-11-29 03:42:06 +0100 |
commit | 36c0192fbb16d068214d2640aecfb731ea24bfaa (patch) | |
tree | 4596eb003c5f074c4ca0b9e1e146680927916d11 /tools/ideviceenterrecovery.c | |
parent | d2b82f9a8330a995a3e913adf734ac2b9ece9916 (diff) | |
download | libimobiledevice-36c0192fbb16d068214d2640aecfb731ea24bfaa.tar.gz libimobiledevice-36c0192fbb16d068214d2640aecfb731ea24bfaa.tar.bz2 |
tools: use pointer instead of static buffer for UDID since it can start with '0'
Diffstat (limited to 'tools/ideviceenterrecovery.c')
-rw-r--r-- | tools/ideviceenterrecovery.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c index fc46e75..62df70f 100644 --- a/tools/ideviceenterrecovery.c +++ b/tools/ideviceenterrecovery.c @@ -45,8 +45,7 @@ int main(int argc, char *argv[]) idevice_t phone = NULL; idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; int i; - char udid[41]; - udid[0] = 0; + const char* udid = NULL; /* parse cmdline args */ for (i = 1; i < argc; i++) { @@ -65,7 +64,7 @@ int main(int argc, char *argv[]) print_usage(argc, argv); return 0; } - strcpy(udid, argv[i]); + udid = argv[i]; ret = idevice_new(&phone, udid); if (ret != IDEVICE_E_SUCCESS) { |