Make signed to unsigned integer truncation cast explicit

This commit is contained in:
Hanno Becker 2019-05-09 15:54:28 +01:00
parent b1aa1b3616
commit 2cdc5c3cf9

View file

@ -5082,7 +5082,7 @@ static int ssl_prepare_record_content( mbedtls_ssl_context *ssl )
rec.data_len = ssl->in_msglen;
rec.data_offset = 0;
#if defined(MBEDTLS_SSL_CID )
rec.cid_len = ssl->in_len - ssl->in_cid;
rec.cid_len = (uint8_t)( ssl->in_len - ssl->in_cid );
memcpy( rec.cid, ssl->in_cid, rec.cid_len );
#endif /* MBEDTLS_SSL_CID */