mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
- Fixed potential memory zeroization on miscrafted RSA key
This commit is contained in:
@ -679,7 +679,7 @@ int rsa_pkcs1_sign( rsa_context *ctx,
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
if( nb_pad < 8 )
|
||||
if( ( nb_pad < 8 ) || ( nb_pad > olen ) )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
*p++ = 0;
|
||||
|
Reference in New Issue
Block a user