diff options
author | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-04-17 08:39:42 +0200 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-04-17 17:26:25 +0200 |
commit | e62fb0d31bdf25854aa2c7cda8e1d03768984ab4 (patch) | |
tree | 4847135fd5f2c2ab259957fea3fa332cd6309eea /crypto/asn1 | |
parent | DRBG: fix coverity issues (diff) | |
download | openssl-e62fb0d31bdf25854aa2c7cda8e1d03768984ab4.tar.xz openssl-e62fb0d31bdf25854aa2c7cda8e1d03768984ab4.zip |
p5_scrypt.c: fix error check of RAND_bytes() call
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/5977)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/p5_scrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/p5_scrypt.c b/crypto/asn1/p5_scrypt.c index c556d017f1..1daaa6f834 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; } |