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/md.c b/library/md.c
index 92fe3a4..d9d6509 100644
--- a/library/md.c
+++ b/library/md.c
@@ -387,7 +387,7 @@
void mbedtls_md_init( mbedtls_md_context_t *ctx )
{
- mbedtls_platform_memset( ctx, 0, sizeof( mbedtls_md_context_t ) );
+ memset( ctx, 0, sizeof( mbedtls_md_context_t ) );
#if defined(MBEDTLS_MD_SINGLE_HASH)
mbedtls_md_info_init( mbedtls_md_get_handle( ctx ),