mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-13 16:25:37 +00:00
Length check added
This commit is contained in:
parent
f10f85f676
commit
df5621c7f1
|
@ -848,6 +848,9 @@ int mbedtls_rsa_rsaes_pkcs1_v15_decrypt( mbedtls_rsa_context *ctx,
|
||||||
bad |= *p++; /* Must be zero */
|
bad |= *p++; /* Must be zero */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( pad_count < 8 )
|
||||||
|
return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA );
|
||||||
|
|
||||||
if( bad )
|
if( bad )
|
||||||
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
|
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue