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
scripts/data_files
|
@ -51,7 +51,7 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
|||
if( buflen == 0 )
|
||||
return;
|
||||
|
||||
memset( buf, 0x00, buflen );
|
||||
mbedtls_platform_memset( buf, 0x00, buflen );
|
||||
|
||||
if( ret < 0 )
|
||||
ret = -ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue