mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:35:44 +01:00
Fix use-after-scope error in programs/ssl
mbedtls_ssl_conf_dtls_srtp_protection_profiles stores the pointer to the profiles in the configuration. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
f3c856536b
commit
880334cba0
@ -2339,12 +2339,12 @@ int main( int argc, char *argv[] )
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_SRTP)
|
||||
const mbedtls_ssl_srtp_profile forced_profile[] =
|
||||
{ opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET };
|
||||
if( opt.use_srtp == 1 )
|
||||
{
|
||||
if( opt.force_srtp_profile != 0 )
|
||||
{
|
||||
const mbedtls_ssl_srtp_profile forced_profile[] =
|
||||
{ opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET };
|
||||
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles ( &conf, forced_profile );
|
||||
}
|
||||
else
|
||||
|
@ -3151,11 +3151,11 @@ int main( int argc, char *argv[] )
|
||||
#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_SRTP)
|
||||
const mbedtls_ssl_srtp_profile forced_profile[] = { opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET };
|
||||
if( opt.use_srtp == 1 )
|
||||
{
|
||||
if( opt.force_srtp_profile != 0 )
|
||||
{
|
||||
const mbedtls_ssl_srtp_profile forced_profile[] = { opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET };
|
||||
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles( &conf, forced_profile );
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user