Use plain memset() in context init functions
We call xxx_init() on a structure when it has been freshly allocated (on the
stack or heap).
At this point it contains random-looking data none of which should be
sensitive, as all sensitive data is wiped using mbedtls_platform_zeroize()
when we're done using it and the memory area is going to be reclaimed (by
exiting the function or free()ing the buffer).
diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c
index e00a834..9d26a73 100644
--- a/library/hmac_drbg.c
+++ b/library/hmac_drbg.c
@@ -56,7 +56,7 @@
*/
void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx )
{
- mbedtls_platform_memset( ctx, 0, sizeof( mbedtls_hmac_drbg_context ) );
+ memset( ctx, 0, sizeof( mbedtls_hmac_drbg_context ) );
#if defined(MBEDTLS_THREADING_C)
mbedtls_mutex_init( &ctx->mutex );