summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_pss.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-09-13 11:29:29 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-09-13 11:29:29 +0000
commita25f33d28a5b4e81646e42609095ef59a3f08990 (patch)
tree8782b5e61a13547956299f8c66e670ef5334b577 /crypto/rsa/rsa_pss.c
parent94480b57db954599a355657a12d77ba926e195c4 (diff)
Submitted by: Julia Lawall <julia@diku.dk>
The functions ENGINE_ctrl(), OPENSSL_isservice(), EVP_PKEY_sign(), CMS_get1_RecipientRequest() and RAND_bytes() can return <=0 on error fix so the return code is checked correctly.
Diffstat (limited to 'crypto/rsa/rsa_pss.c')
-rw-r--r--crypto/rsa/rsa_pss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_pss.c b/crypto/rsa/rsa_pss.c
index 775c36114f..ac211e2ffe 100644
--- a/crypto/rsa/rsa_pss.c
+++ b/crypto/rsa/rsa_pss.c
@@ -222,7 +222,7 @@ int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
ERR_R_MALLOC_FAILURE);
goto err;
}
- if (!RAND_bytes(salt, sLen))
+ if (RAND_bytes(salt, sLen) <= 0)
goto err;
}
maskedDBLen = emLen - hLen - 1;