Fix missing return in error check

This commit is contained in:
Manuel Pégourié-Gonnard 2014-09-09 17:45:31 +02:00 committed by Paul Bakker
parent 19d438f4ff
commit 4a1753657c

View file

@ -2342,6 +2342,7 @@ static int ssl_prepare_handshake_record( ssl_context *ssl )
{
SSL_DEBUG_MSG( 1, ( "handshake message too short: %d",
ssl->in_msglen ) );
return( POLARSSL_ERR_SSL_INVALID_RECORD );
}
ssl->in_hslen = ssl_hs_hdr_len( ssl ) + (
@ -2643,6 +2644,9 @@ int ssl_read_record( ssl_context *ssl )
memmove( ssl->in_msg, ssl->in_msg + ssl->in_hslen,
ssl->in_msglen );
SSL_DEBUG_BUF( 4, "remaining content in record",
ssl->in_msg, ssl->in_msglen );
if( ( ret = ssl_prepare_handshake_record( ssl ) ) != 0 )
return( ret );