summaryrefslogtreecommitdiff
path: root/cipher/blake2.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-01-31 10:00:53 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-01-31 10:00:53 +0900
commit7dc488ae036addd69878681a4eab6d25e9d99c8e (patch)
tree0b148a72bca357bf8d3bab3384cbb05571dc8ff2 /cipher/blake2.c
parent54369c66bedd20d6846ed8fab678082ec8eecf5d (diff)
downloadlibgcrypt-7dc488ae036addd69878681a4eab6d25e9d99c8e.tar.gz
ciper/blake2: Make sure to clean up the stack.
* cipher/blake2.c (blake2b_vl_hash): Wipe the memory. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'cipher/blake2.c')
-rw-r--r--cipher/blake2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cipher/blake2.c b/cipher/blake2.c
index dc70eb48..a5926b95 100644
--- a/cipher/blake2.c
+++ b/cipher/blake2.c
@@ -522,6 +522,8 @@ blake2b_vl_hash (const void *in, size_t inlen, size_t outputlen, void *output)
memcpy ((unsigned char *)output+r*32, d+32, remained);
}
+ wipememory (buf, sizeof (buf));
+ wipememory (&ctx, sizeof (ctx));
return 0;
}