- 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:
Paul Bakker 2011-05-05 11:49:20 +00:00
parent f968857a82
commit 6c591fab72
11 changed files with 230 additions and 137 deletions

View file

@ -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