mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-04 22:19:05 +00:00
Replace memset() with mbedtls_platform_memset()
Steps:
1. sed -i 's/\bmemset(\([^)]\)/mbedtls_platform_memset(\1/g' library/*.c tinycrypt/*.c include/mbedtls/*.h scripts/data_files/*.fmt
2. Manually edit library/platform_util.c to revert to memset() in the
implementations of mbedtls_platform_memset() and mbedtls_platform_memcpy()
3. egrep -n '\<memset\>' library/*.c include/mbedtls/*.h tinycrypt/*.c
The remaining occurrences are in three categories:
a. From point 2 above.
b. In comments.
c. In the initialisation of memset_func, to be changed in a future commit.
This commit is contained in:
parent
c4315e6d5e
commit
7a346b866c
57 changed files with 223 additions and 223 deletions
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache )
|
||||
{
|
||||
memset( cache, 0, sizeof( mbedtls_ssl_cache_context ) );
|
||||
mbedtls_platform_memset( cache, 0, sizeof( mbedtls_ssl_cache_context ) );
|
||||
|
||||
cache->timeout = MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT;
|
||||
cache->max_entries = MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES;
|
||||
|
|
@ -260,7 +260,7 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session )
|
|||
if( cur->peer_cert.p != NULL )
|
||||
{
|
||||
mbedtls_free( cur->peer_cert.p );
|
||||
memset( &cur->peer_cert, 0, sizeof(mbedtls_x509_buf) );
|
||||
mbedtls_platform_memset( &cur->peer_cert, 0, sizeof(mbedtls_x509_buf) );
|
||||
}
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue