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:
parent
4abca7e9f3
commit
5db5edc99a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue