diff options
author | Mansour Ahmadi <m.ahmadi@northeastern.edu> | 2018-12-11 17:26:50 -0500 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-12-13 09:48:50 +0000 |
commit | 5db5edc99a8386516da06f8078e5134ccd65a64b (patch) | |
tree | 2ad6f6e9216ab16d6af937dedabd043814a06cc8 /crypto/rsa/rsa_pk1.c | |
parent | 4abca7e9f37c8b6cfc0e5fe1fd7b624e2f14b751 (diff) |
fix inconsistent flen check in rsa_pk1 and rsa_oaep
Fixes #7117
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7880)
(cherry picked from commit 4fea7005c3d08ed0d575bdea5082b7b0ce355237)
Diffstat (limited to 'crypto/rsa/rsa_pk1.c')
-rw-r--r-- | crypto/rsa/rsa_pk1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c index b3a7a06117..0626907418 100644 --- a/crypto/rsa/rsa_pk1.c +++ b/crypto/rsa/rsa_pk1.c @@ -161,7 +161,7 @@ int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, unsigned int good, found_zero_byte, mask; int zero_index = 0, msg_index, mlen = -1; - if (tlen < 0 || flen < 0) + if (tlen <= 0 || flen <= 0) return -1; /* |