[openssl-commits] [openssl] master update

matthias.st.pierre at ncp-e.com matthias.st.pierre at ncp-e.com
Tue Apr 17 15:28:31 UTC 2018


The branch master has been updated
       via  e62fb0d31bdf25854aa2c7cda8e1d03768984ab4 (commit)
      from  43687d685ffd71fc1cf0ea1079f6d4958dff5026 (commit)


- Log -----------------------------------------------------------------
commit e62fb0d31bdf25854aa2c7cda8e1d03768984ab4
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date:   Tue Apr 17 08:39:42 2018 +0200

    p5_scrypt.c: fix error check of RAND_bytes() call
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/5977)

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

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

diff --git a/crypto/asn1/p5_scrypt.c b/crypto/asn1/p5_scrypt.c
index c556d01..1daaa6f 100644
--- a/crypto/asn1/p5_scrypt.c
+++ b/crypto/asn1/p5_scrypt.c
@@ -82,7 +82,7 @@ X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher,
     if (EVP_CIPHER_iv_length(cipher)) {
         if (aiv)
             memcpy(iv, aiv, EVP_CIPHER_iv_length(cipher));
-        else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0)
+        else if (RAND_bytes(iv, EVP_CIPHER_iv_length(cipher)) <= 0)
             goto err;
     }
 


More information about the openssl-commits mailing list