Ensure return for mbedtls_ssl_write_alpn_ext() is checked

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2022-07-11 12:36:20 +01:00
parent 9a8d78419f
commit f518f81d41

View file

@ -2387,7 +2387,10 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
#if defined(MBEDTLS_SSL_ALPN)
unsigned char *end = buf + MBEDTLS_SSL_OUT_CONTENT_LEN - 4;
mbedtls_ssl_write_alpn_ext( ssl, p + 2 + ext_len, end, &olen );
if( ( ret = mbedtls_ssl_write_alpn_ext( ssl, p + 2 + ext_len, end, &olen ) )
!= 0 )
return ret;
ext_len += olen;
#endif