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 4fea7005c3)
This commit is contained in:
Mansour Ahmadi 2018-12-11 17:26:50 -05:00 committed by Matt Caswell
parent 4abca7e9f3
commit 5db5edc99a

View file

@ -161,7 +161,7 @@ int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
unsigned int good, found_zero_byte, mask; unsigned int good, found_zero_byte, mask;
int zero_index = 0, msg_index, mlen = -1; int zero_index = 0, msg_index, mlen = -1;
if (tlen < 0 || flen < 0) if (tlen <= 0 || flen <= 0)
return -1; return -1;
/* /*