diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 8d1b06010..64006ec62 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -287,6 +287,7 @@ static int write_and_get_response( int sock_fd, unsigned char *buf, size_t len ) return -1; } + data[len] = '\0'; printf("\n%s", data); len = ret; for( i = 0; i < len; i++ ) diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index ddf2c7892..2f359ad34 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c @@ -222,6 +222,7 @@ int main( int argc, char *argv[] ) printf( "\n" ); memset( buf, 0xAA, sizeof( buf ) ); + memset( tmp, 0xBB, sizeof( tmp ) ); #if defined(POLARSSL_MD4_C) if( todo.md4 )