1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Address some comments

Hostname_len has at least one byte
Change structure serialized_session_tls13
Fix various issues

Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
Xiaokang Qian
2022-09-28 07:11:02 +00:00
parent 281fd1bdd8
commit ecd7528c7f
2 changed files with 14 additions and 11 deletions

View File

@ -79,7 +79,7 @@ static int ssl_write_hostname_ext( mbedtls_ssl_context *ssl,
{
ssl->session_negotiate->hostname = mbedtls_calloc( 1, hostname_len );
if( ssl->session_negotiate->hostname == NULL )
return MBEDTLS_ERR_SSL_ALLOC_FAILED;
return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
memcpy(ssl->session_negotiate->hostname, ssl->hostname, hostname_len);
}
ssl->session_negotiate->hostname_len = hostname_len;