mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-24 22:51:03 +00:00
Length check added
This commit is contained in:
parent
01660396da
commit
f570f7f686
|
@ -851,6 +851,9 @@ int rsa_rsaes_pkcs1_v15_decrypt( rsa_context *ctx,
|
|||
bad |= *p++; /* Must be zero */
|
||||
}
|
||||
|
||||
if( pad_count < 8 )
|
||||
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
if( bad )
|
||||
return( POLARSSL_ERR_RSA_INVALID_PADDING );
|
||||
|
||||
|
|
Loading…
Reference in a new issue