From: Sean Parkinson Date: Thu, 29 Mar 2018 04:55:55 +0000 (+1000) Subject: wolfSSL: Fix crypto_hash_init() memory clearing X-Git-Tag: hostap_2_7~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06657d3166b9fb6a115ae8164d0ea50e830770c9;p=thirdparty%2Fhostap.git 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 --- 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;