Use defines to check alpn ext list validity
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
2064355747
commit
a32236c813
2 changed files with 6 additions and 1 deletions
|
@ -6526,7 +6526,9 @@ int mbedtls_ssl_conf_alpn_protocols( mbedtls_ssl_config *conf, const char **prot
|
|||
cur_len = strlen( *p );
|
||||
tot_len += cur_len;
|
||||
|
||||
if( cur_len == 0 || cur_len > 255 || tot_len > 65535 )
|
||||
if( ( cur_len == 0 ) ||
|
||||
( cur_len > MBEDTLS_SSL_MAX_ALPN_NAME_LEN ) ||
|
||||
( tot_len > MBEDTLS_SSL_MAX_ALPN_LIST_LEN ) )
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue