diff options
author | Martin Szulecki | 2010-07-08 19:12:06 +0200 |
---|---|---|
committer | Martin Szulecki | 2010-07-08 19:12:06 +0200 |
commit | 0a07525af88d5b6522809595d4c5e1eb2a6e022c (patch) | |
tree | eb6e4b9d732393502f211cb45d11e7defa5cfa08 | |
parent | 742d9e87ad40c6d338ea2bf050ea5fb527a59b58 (diff) | |
download | idevicerestore-0a07525af88d5b6522809595d4c5e1eb2a6e022c.tar.gz idevicerestore-0a07525af88d5b6522809595d4c5e1eb2a6e022c.tar.bz2 |
Fix segfault due to broken retrieval of board id
-rw-r--r-- | src/idevicerestore.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 2a7a96b..03845fe 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -370,16 +370,16 @@ int check_device(struct idevicerestore_client_t* client) { int get_bdid(struct idevicerestore_client_t* client, uint32_t* bdid) { switch (client->mode->index) { case MODE_NORMAL: - if (normal_get_bdid(client->uuid, &client->device->board_id) < 0) { - client->device->board_id = -1; + if (normal_get_bdid(client->uuid, bdid) < 0) { + *bdid = 0; return -1; } break; case MODE_DFU: case MODE_RECOVERY: - if (recovery_get_bdid(client, &client->device->board_id) < 0) { - client->device->board_id = -1; + if (recovery_get_bdid(client, bdid) < 0) { + *bdid = 0; return -1; } break; |