mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
- mpi_init() and mpi_free() only accept a single argument and do not accept variable arguments anymore. This prevents unexpected memory corruption in a number of use cases.
This commit is contained in:
parent
f968857a82
commit
6c591fab72
11 changed files with 230 additions and 137 deletions
|
|
@ -45,7 +45,7 @@ debug_print_mpi:radix:value:file:line:prefix:result_str
|
|||
struct buffer_data buffer;
|
||||
mpi val;
|
||||
|
||||
mpi_init( &val, NULL );
|
||||
mpi_init( &val );
|
||||
|
||||
memset( &ssl, 0, sizeof( ssl_context ) );
|
||||
memset( buffer.buf, 0, 2000 );
|
||||
|
|
@ -57,6 +57,8 @@ debug_print_mpi:radix:value:file:line:prefix:result_str
|
|||
debug_print_mpi( &ssl, 0, {file}, {line}, {prefix}, &val);
|
||||
|
||||
TEST_ASSERT( strcmp( buffer.buf, {result_str} ) == 0 );
|
||||
|
||||
mpi_free( &val );
|
||||
}
|
||||
END_CASE
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue