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/ssl_tls.c b/library/ssl_tls.c
index ddc58a4..e9102a7 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -3376,7 +3376,7 @@
const size_t max_len = rec->data_len + padlen;
const size_t min_len = ( max_len > 256 ) ? max_len - 256 : 0;
- mbedtls_platform_memset( tmp, 0, sizeof( tmp ) );
+ memset( tmp, 0, sizeof( tmp ) );
switch( mbedtls_md_get_type(
mbedtls_md_get_handle( &transform->md_ctx_dec ) ) )