mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-26 10:11:04 +00:00
Check retval of remaining_payload_in_datagram in ssl_write_record()
This commit is contained in:
parent
ecff205548
commit
1f5a15d86d
|
@ -3383,7 +3383,16 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl, uint8_t force_flush )
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
|
||||||
{
|
{
|
||||||
size_t remaining = ssl_get_remaining_payload_in_datagram( ssl );
|
size_t remaining;
|
||||||
|
ret = ssl_get_remaining_payload_in_datagram( ssl );
|
||||||
|
if( ret < 0 )
|
||||||
|
{
|
||||||
|
MBEDTLS_SSL_DEBUG_RET( 1, "ssl_get_remaining_payload_in_datagram",
|
||||||
|
ret );
|
||||||
|
return( ret );
|
||||||
|
}
|
||||||
|
|
||||||
|
remaining = (size_t) ret;
|
||||||
if( remaining == 0 )
|
if( remaining == 0 )
|
||||||
flush = SSL_FORCE_FLUSH;
|
flush = SSL_FORCE_FLUSH;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue