mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-13 00:55:29 -04: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->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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user