Skip to content

Commit

Permalink
Update tox.c
Browse files Browse the repository at this point in the history
  • Loading branch information
dubslow committed Sep 4, 2014
1 parent f383151 commit c3e3258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toxcore/tox.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint3
{ /* out of memory most likely */
return -1;
}
randombytes_buf(passphrase, pplength); /* wipe plaintext pw */
sodium_memzero(passphrase, pplength); /* wipe plaintext pw */

/* next get plain save data */
uint32_t temp_size = tox_size(tox);
Expand Down Expand Up @@ -958,7 +958,7 @@ int tox_encrypted_load(Tox *tox, const uint8_t *data, uint32_t length, uint8_t *
{ /* out of memory most likely */
return -1;
}
randombytes_buf(passphrase, pplength); /* wipe plaintext pw */
sodium_memzero(passphrase, pplength); /* wipe plaintext pw */

/* decrypt the data */
uint8_t temp_data[decrypt_length];
Expand Down

0 comments on commit c3e3258

Please sign in to comment.