mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-11 01:04:16 +00:00
Add a length check in ssl_derive_keys()
This commit is contained in:
parent
511d809dd1
commit
4091141368
|
@ -526,6 +526,12 @@ int ssl_derive_keys( ssl_context *ssl )
|
||||||
transform->keylen, transform->minlen, transform->ivlen,
|
transform->keylen, transform->minlen, transform->ivlen,
|
||||||
transform->maclen ) );
|
transform->maclen ) );
|
||||||
|
|
||||||
|
if( transform->maclen > sizeof transform->mac_enc )
|
||||||
|
{
|
||||||
|
SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
||||||
|
return( POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finally setup the cipher contexts, IVs and MAC secrets.
|
* Finally setup the cipher contexts, IVs and MAC secrets.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue