aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-06-22 10:28:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2017-06-22 10:52:11 +0200
commit64919b3fdaa41fbdb857cc2b1f4680dd30f14727 (patch)
treecffddfd4b40990abfd87b692d821e1bcdd7d9953
parent462068f247b0073aeb7b1866529e3cbba299e612 (diff)
downloadmkinitcpio-ykfde-64919b3fdaa41fbdb857cc2b1f4680dd30f14727.tar.gz
mkinitcpio-ykfde-64919b3fdaa41fbdb857cc2b1f4680dd30f14727.tar.zst
wipe second factor from memory
-rw-r--r--udev/ykfde.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/udev/ykfde.c b/udev/ykfde.c
index ab20fbd..ef0cefc 100644
--- a/udev/ykfde.c
+++ b/udev/ykfde.c
@@ -178,6 +178,7 @@ static int get_response(const unsigned int serial, uint8_t slot, char * challeng
second_factor_len = strlen(second_factor);
memcpy(challenge, second_factor, second_factor_len < CHALLENGELEN / 2 ?
second_factor_len : CHALLENGELEN / 2);
+ memset(second_factor, 0, second_factor_len);
free(second_factor);
}