mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Replace malloc with calloc
- platform layer currently broken (not adapted yet) - memmory_buffer_alloc too
This commit is contained in:
parent
065122cfe9
commit
7551cb9ee9
31 changed files with 122 additions and 131 deletions
|
|
@ -23,7 +23,7 @@ void mbedtls_pem_write_buffer( char *start, char *end, char *buf_str, char *resu
|
|||
ret = mbedtls_pem_write_buffer( start, end, buf, buf_len, NULL, 0, &olen );
|
||||
TEST_ASSERT( ret == MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL );
|
||||
|
||||
check_buf = (unsigned char *) mbedtls_malloc( olen );
|
||||
check_buf = (unsigned char *) mbedtls_calloc( 1, olen );
|
||||
TEST_ASSERT( check_buf != NULL );
|
||||
|
||||
memset( check_buf, 0, olen );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue