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/ccm.c b/library/ccm.c
index a21e3c3..9258082 100644
--- a/library/ccm.c
+++ b/library/ccm.c
@@ -66,7 +66,7 @@
void mbedtls_ccm_init( mbedtls_ccm_context *ctx )
{
CCM_VALIDATE( ctx != NULL );
- mbedtls_platform_memset( ctx, 0, sizeof( mbedtls_ccm_context ) );
+ memset( ctx, 0, sizeof( mbedtls_ccm_context ) );
}
int mbedtls_ccm_setkey( mbedtls_ccm_context *ctx,