mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-07 04:36:41 +00:00
Length check added
This commit is contained in:
committed by
Simon Butcher
parent
7dc6f93db1
commit
8dfdce3341
@@ -856,6 +856,9 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
|
||||
bad |= *p++; /* Must be zero */
|
||||
}
|
||||
|
||||
if( pad_count < 8 )
|
||||
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
if( bad )
|
||||
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user