mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-09 16:09:47 +00:00
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)
This commit is contained in:
parent
ee4afacd96
commit
4fea7005c3
@ -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…
x
Reference in New Issue
Block a user