Use plain memset() for freshly allocated objects
This commits reverts to plain memset() for cases like:
some_type foo;
memset( &foo, 0, sizeof( foo ) );
(Sometimes there is code between declaration in memset(), but it doesn't
matter as long as it doesn't touch foo.)
The reasoning is the same as in the previous commit: the stack shouldn't
contain sensitive data as we carefully wipe it after use.
diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c
index 9d26a73..03c7d67 100644
--- a/library/hmac_drbg.c
+++ b/library/hmac_drbg.c
@@ -178,7 +178,7 @@
}
}
- mbedtls_platform_memset( seed, 0, MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT );
+ memset( seed, 0, MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT );
/* IV. Gather entropy_len bytes of entropy for the seed */
if( ( ret = ctx->f_entropy( ctx->p_entropy,