mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 13:51:09 +00:00
Merge pull request #3965 from bensze01/use_after_scope
Fix use-after-scope error in programs/ssl
This commit is contained in:
commit
e9e0388934
2
ChangeLog.d/programs-ssl-use-after-scope.txt
Normal file
2
ChangeLog.d/programs-ssl-use-after-scope.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Bugfix
|
||||||
|
* Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c
|
|
@ -2339,12 +2339,12 @@ int main( int argc, char *argv[] )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_DTLS_SRTP)
|
#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.use_srtp == 1 )
|
||||||
{
|
{
|
||||||
if( opt.force_srtp_profile != 0 )
|
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 );
|
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles ( &conf, forced_profile );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -3151,11 +3151,11 @@ int main( int argc, char *argv[] )
|
||||||
#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */
|
#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_DTLS_SRTP)
|
#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.use_srtp == 1 )
|
||||||
{
|
{
|
||||||
if( opt.force_srtp_profile != 0 )
|
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 );
|
ret = mbedtls_ssl_conf_dtls_srtp_protection_profiles( &conf, forced_profile );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue