- Fixed possible uninitialized values

This commit is contained in:
Paul Bakker 2011-04-01 11:39:39 +00:00
parent 0216cc1bee
commit 99a03afc22
3 changed files with 4 additions and 5 deletions

View File

@ -131,7 +131,7 @@ int dhm_make_params( dhm_context *ctx, int x_size,
unsigned char *output, int *olen,
int (*f_rng)(void *), void *p_rng )
{
int i, ret, n, n1, n2, n3;
int ret, n, n1, n2, n3;
unsigned char *p;
/*
@ -206,8 +206,7 @@ int dhm_make_public( dhm_context *ctx, int x_size,
unsigned char *output, int olen,
int (*f_rng)(void *), void *p_rng )
{
int ret, i, n;
unsigned char *p;
int ret, n;
if( ctx == NULL || olen < 1 || olen > ctx->len )
return( POLARSSL_ERR_DHM_BAD_INPUT_DATA );

View File

@ -625,7 +625,7 @@ static int ssl_write_client_key_exchange( ssl_context *ssl )
static int ssl_write_certificate_verify( ssl_context *ssl )
{
int ret, n;
int ret = 0, n = 0;
unsigned char hash[36];
SSL_DEBUG_MSG( 2, ( "=> write certificate verify" ) );

View File

@ -681,7 +681,7 @@ static int ssl_write_server_hello_done( ssl_context *ssl )
static int ssl_parse_client_key_exchange( ssl_context *ssl )
{
int ret, i, n;
int ret, i, n = 0;
SSL_DEBUG_MSG( 2, ( "=> parse client key exchange" ) );