mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-11 06:28:17 +02: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:
@@ -654,7 +654,7 @@ static int pk_get_pk_alg( unsigned char **p,
|
||||
int ret;
|
||||
mbedtls_asn1_buf alg_oid;
|
||||
|
||||
memset( params, 0, sizeof(mbedtls_asn1_buf) );
|
||||
mbedtls_platform_memset( params, 0, sizeof(mbedtls_asn1_buf) );
|
||||
|
||||
if( ( ret = mbedtls_asn1_get_alg( p, end, &alg_oid, params ) ) != 0 )
|
||||
return( MBEDTLS_ERR_PK_INVALID_ALG + ret );
|
||||
|
||||
Reference in New Issue
Block a user