summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordubslow <dubslow@users.noreply.github.com>2014-09-04 06:16:22 -0500
committerdubslow <dubslow@users.noreply.github.com>2014-09-04 06:16:22 -0500
commitc3e32587884be246528e74e30ef017159a5eb3fc (patch)
treec374bc5508fb581d37e895b4e24670b42b185826
parentf3831513e84745397163b874f5de28051a3a00ce (diff)
Update tox.c
-rw-r--r--toxcore/tox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 600eafa6..c3199fef 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -898,7 +898,7 @@ int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint3
898 { /* out of memory most likely */ 898 { /* out of memory most likely */
899 return -1; 899 return -1;
900 } 900 }
901 randombytes_buf(passphrase, pplength); /* wipe plaintext pw */ 901 sodium_memzero(passphrase, pplength); /* wipe plaintext pw */
902 902
903 /* next get plain save data */ 903 /* next get plain save data */
904 uint32_t temp_size = tox_size(tox); 904 uint32_t temp_size = tox_size(tox);
@@ -958,7 +958,7 @@ int tox_encrypted_load(Tox *tox, const uint8_t *data, uint32_t length, uint8_t *
958 { /* out of memory most likely */ 958 { /* out of memory most likely */
959 return -1; 959 return -1;
960 } 960 }
961 randombytes_buf(passphrase, pplength); /* wipe plaintext pw */ 961 sodium_memzero(passphrase, pplength); /* wipe plaintext pw */
962 962
963 /* decrypt the data */ 963 /* decrypt the data */
964 uint8_t temp_data[decrypt_length]; 964 uint8_t temp_data[decrypt_length];