mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Change byte copy to memcpy
Change setting the mki value byte after byte with `memcpy()`. Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
@ -2606,7 +2606,7 @@ static void ssl_write_use_srtp_ext( mbedtls_ssl_context *ssl,
|
||||
unsigned char *buf,
|
||||
size_t *olen )
|
||||
{
|
||||
size_t mki_len = 0, ext_len = 0, i;
|
||||
size_t mki_len = 0, ext_len = 0;
|
||||
uint16_t profile_value = 0;
|
||||
|
||||
if( ssl->dtls_srtp_info.chosen_dtls_srtp_profile == MBEDTLS_SRTP_UNSET_PROFILE )
|
||||
@ -2650,10 +2650,7 @@ static void ssl_write_use_srtp_ext( mbedtls_ssl_context *ssl,
|
||||
}
|
||||
|
||||
buf[8] = mki_len & 0xFF;
|
||||
for( i=0; i < mki_len; i++ )
|
||||
{
|
||||
buf[9 + i] = ssl->dtls_srtp_info.mki_value[i];
|
||||
}
|
||||
memcpy( &buf[9], ssl->dtls_srtp_info.mki_value, mki_len );
|
||||
|
||||
*olen = 9 + mki_len;
|
||||
}
|
||||
|
Reference in New Issue
Block a user