The branch master has been updated
       via  4fea7005c3d08ed0d575bdea5082b7b0ce355237 (commit)
      from  ee4afacd96f5bfbe7662c8f0ec4464c6eee4c450 (commit)


- Log -----------------------------------------------------------------
commit 4fea7005c3d08ed0d575bdea5082b7b0ce355237
Author: Mansour Ahmadi <[email protected]>
Date:   Tue Dec 11 17:26:50 2018 -0500

    fix inconsistent flen check in rsa_pk1 and rsa_oaep
    
    Fixes #7117
    
    Reviewed-by: Kurt Roeckx <[email protected]>
    Reviewed-by: Matt Caswell <[email protected]>
    (Merged from https://github.com/openssl/openssl/pull/7880)

-----------------------------------------------------------------------

Summary of changes:
 crypto/rsa/rsa_pk1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/rsa/rsa_pk1.c b/crypto/rsa/rsa_pk1.c
index 13f1d82..cb7518e 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;
 
     /*
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to