summaryrefslogtreecommitdiffstats
path: root/contrib/wpa/src/crypto/sha256-kdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/wpa/src/crypto/sha256-kdf.c')
-rw-r--r--contrib/wpa/src/crypto/sha256-kdf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/wpa/src/crypto/sha256-kdf.c b/contrib/wpa/src/crypto/sha256-kdf.c
index d8a1beb..e7509ce 100644
--- a/contrib/wpa/src/crypto/sha256-kdf.c
+++ b/contrib/wpa/src/crypto/sha256-kdf.c
@@ -61,6 +61,7 @@ int hmac_sha256_kdf(const u8 *secret, size_t secret_len,
if (iter == 255) {
os_memset(out, 0, outlen);
+ os_memset(T, 0, SHA256_MAC_LEN);
return -1;
}
iter++;
@@ -68,9 +69,11 @@ int hmac_sha256_kdf(const u8 *secret, size_t secret_len,
if (hmac_sha256_vector(secret, secret_len, 4, addr, len, T) < 0)
{
os_memset(out, 0, outlen);
+ os_memset(T, 0, SHA256_MAC_LEN);
return -1;
}
}
+ os_memset(T, 0, SHA256_MAC_LEN);
return 0;
}
OpenPOWER on IntegriCloud