summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-07-08 19:12:06 +0200
committerGravatar Martin Szulecki2010-07-08 19:12:06 +0200
commit0a07525af88d5b6522809595d4c5e1eb2a6e022c (patch)
treeeb6e4b9d732393502f211cb45d11e7defa5cfa08 /src
parent742d9e87ad40c6d338ea2bf050ea5fb527a59b58 (diff)
downloadidevicerestore-0a07525af88d5b6522809595d4c5e1eb2a6e022c.tar.gz
idevicerestore-0a07525af88d5b6522809595d4c5e1eb2a6e022c.tar.bz2
Fix segfault due to broken retrieval of board id
Diffstat (limited to 'src')
-rw-r--r--src/idevicerestore.c8
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;