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/aes.c b/library/aes.c
index 4850fab..247bbde 100644
--- a/library/aes.c
+++ b/library/aes.c
@@ -519,7 +519,7 @@
{
AES_VALIDATE( ctx != NULL );
- mbedtls_platform_memset( ctx, 0, sizeof( mbedtls_aes_context ) );
+ memset( ctx, 0, sizeof( mbedtls_aes_context ) );
}
void mbedtls_aes_free( mbedtls_aes_context *ctx )