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 <sean@wolfssl.com>
This commit is contained in:
Sean Parkinson 2018-03-29 14:55:55 +10:00 committed by Jouni Malinen
parent d396057109
commit 06657d3166

View file

@ -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;