diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-11-07 18:08:32 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-11-07 18:08:32 +0100 |
commit | d72762739b4f079acbe72fdb69b123e338064a33 (patch) | |
tree | d3faee89b26dd5e599ab76695b208c7935f7070b | |
parent | forgot to include signal.h (diff) | |
download | libpassphrase-d72762739b4f079acbe72fdb69b123e338064a33.tar.gz libpassphrase-d72762739b4f079acbe72fdb69b123e338064a33.tar.bz2 libpassphrase-d72762739b4f079acbe72fdb69b123e338064a33.tar.xz |
wipe the passphrase from the memory
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r-- | src/cerberus.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cerberus.c b/src/cerberus.c index 76a2f74..88d4ae5 100644 --- a/src/cerberus.c +++ b/src/cerberus.c @@ -137,6 +137,15 @@ int main(int argc, char** argv) } + /* Wipe the passphrase from the memory */ + if (skip_auth == 0) + { + long i; + for (i = 0; *(passphrase + i); i++) + *(passphrase + i) = 0; + } + + /* Reset terminal settings */ reenable_echo(); |