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:43:07 +0000 |
commit | 4fea7005c3d08ed0d575bdea5082b7b0ce355237 (patch) | |
tree | a1a96fc21ee11125e8e8d08fedba3ccca5f26ac2 /crypto/rsa | |
parent | ee4afacd96f5bfbe7662c8f0ec4464c6eee4c450 (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)
Diffstat (limited to 'crypto/rsa')
-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 13f1d827be..cb7518e1d2 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; /* |