summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-10-19 13:59:42 +0200
committerFlorian Dold <florian@dold.me>2021-10-19 13:59:42 +0200
commit789268e1b9320a0757fe3c191767b155aedd351d (patch)
treee77ade13fc7462090629fde8a6ca5a976f28821a /src
parent2e2abc61db54f3a25fcb261e2d93277673770d70 (diff)
kdf: zero out salt correctly
Diffstat (limited to 'src')
-rw-r--r--src/util/crypto_hkdf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/crypto_hkdf.c b/src/util/crypto_hkdf.c
index ba3626e1a..4e4496819 100644
--- a/src/util/crypto_hkdf.c
+++ b/src/util/crypto_hkdf.c
@@ -116,7 +116,8 @@ getPRK (gcry_md_hd_t mac, const void *xts, size_t xts_len, const void *skm,
if (xts_len == 0)
{
- char zero_salt[dlen] = { 0 };
+ char zero_salt[dlen];
+ memset (zero_salt, 0, dlen);
ret = doHMAC (mac, zero_salt, dlen, skm, skm_len);
}
else