diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-01-31 10:00:53 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-01-31 10:00:53 +0900 |
commit | 7dc488ae036addd69878681a4eab6d25e9d99c8e (patch) | |
tree | 0b148a72bca357bf8d3bab3384cbb05571dc8ff2 /cipher | |
parent | 54369c66bedd20d6846ed8fab678082ec8eecf5d (diff) | |
download | libgcrypt-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')
-rw-r--r-- | cipher/blake2.c | 2 |
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; } |