summaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-02-26 16:28:59 +0000
committerMatt Caswell <matt@openssl.org>2015-03-25 12:41:28 +0000
commit8f8e4e4f5253085ab673bb74094c3e492c56af44 (patch)
tree1fb6e32d1f10e7ca77521df3a25f887bf083f7a8 /crypto/dsa
parenta20718fa2c0a45e6acb975cf6c0438c3ebd45b13 (diff)
Fix RAND_(pseudo_)?_bytes returns
Ensure all calls to RAND_bytes and RAND_pseudo_bytes have their return value checked correctly Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_gen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index 8920036939..4a6560dd68 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -204,7 +204,8 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
goto err;
if (!seed_len) {
- RAND_pseudo_bytes(seed, qsize);
+ if(RAND_pseudo_bytes(seed, qsize) < 0)
+ goto err;
seed_is_random = 1;
} else {
seed_is_random = 0;