From 06657d3166b9fb6a115ae8164d0ea50e830770c9 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Thu, 29 Mar 2018 14:55:55 +1000 Subject: [PATCH] wolfSSL: Fix crypto_hash_init() memory clearing Explicitly clear the allocated memory to avoid uninitialized data in struct crypto_hash. Signed-off-by: Sean Parkinson --- src/crypto/crypto_wolfssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 2fce6b84d..e29a6f554 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -889,7 +889,7 @@ struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, struct crypto_hash *hash; int type; - hash = os_malloc(sizeof(*hash)); + hash = os_zalloc(sizeof(*hash)); if (!hash) goto done;