summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-01-11 03:41:14 +0100
committerGravatar Nikias Bassen2013-01-11 03:41:14 +0100
commit34906648182cfa53c0158b34f582393cf53d7eb8 (patch)
tree35451281e157f49483441c12d5694076362da135 /src
parenta5ac9639e5c1f6f753206c1d750d8e65cf95262a (diff)
downloadidevicerestore-34906648182cfa53c0158b34f582393cf53d7eb8.tar.gz
idevicerestore-34906648182cfa53c0158b34f582393cf53d7eb8.tar.bz2
fix possible memory corruption due to bad cast from int to uint64_t
Diffstat (limited to 'src')
-rw-r--r--src/normal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/normal.c b/src/normal.c
index e8835d2..b3cfb81 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -369,7 +369,9 @@ int normal_get_nonce(struct idevicerestore_client_t* client, unsigned char** non
return -1;
}
- plist_get_data_val(nonce_node, (char**)nonce, (uint64_t*)nonce_size);
+ uint64_t n_size = 0;
+ plist_get_data_val(nonce_node, (char**)nonce, &n_size);
+ *nonce_size = (int)n_size;
plist_free(nonce_node);
lockdownd_client_free(lockdown);