aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-07 18:08:32 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-07 18:08:32 +0100
commitd72762739b4f079acbe72fdb69b123e338064a33 (patch)
treed3faee89b26dd5e599ab76695b208c7935f7070b
parentforgot to include signal.h (diff)
downloadlibpassphrase-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>
Diffstat (limited to '')
-rw-r--r--src/cerberus.c9
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();