Reintroduce length 0 check for records
This commit is contained in:
parent
d0b66d08bb
commit
d417cc945c
1 changed files with 3 additions and 0 deletions
|
@ -5109,6 +5109,9 @@ static int ssl_parse_record_header( mbedtls_ssl_context const *ssl,
|
|||
rec->buf = buf;
|
||||
rec->buf_len = rec->data_offset + rec->data_len;
|
||||
|
||||
if( rec->data_len == 0 )
|
||||
return( MBEDTLS_ERR_SSL_INVALID_RECORD );
|
||||
|
||||
/*
|
||||
* DTLS-related tests.
|
||||
* Check epoch before checking length constraint because
|
||||
|
|
Loading…
Reference in a new issue