diff options
author | Bodo Möller <bodo@openssl.org> | 2000-02-29 23:37:27 +0100 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-02-29 23:37:27 +0100 |
commit | 19c057da2e9769bfc332edb79c262e7e61ac785c (patch) | |
tree | 47e3cbb792925bb43bd9e68342a01db918f3c585 /crypto | |
parent | Point to INSTALL.MacOS for MacOS pre X. (diff) | |
download | openssl-19c057da2e9769bfc332edb79c262e7e61ac785c.tar.xz openssl-19c057da2e9769bfc332edb79c262e7e61ac785c.zip |
Check BN_rand return value.
"make update".
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dsa/dsa_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/dsa/dsa_key.c b/crypto/dsa/dsa_key.c index ab7f38fc7c..5aef2d5fcf 100644 --- a/crypto/dsa/dsa_key.c +++ b/crypto/dsa/dsa_key.c @@ -84,7 +84,8 @@ int DSA_generate_key(DSA *dsa) i=BN_num_bits(dsa->q); for (;;) { - BN_rand(priv_key,i,1,0); + if (!BN_rand(priv_key,i,1,0)) + goto err; if (BN_cmp(priv_key,dsa->q) >= 0) BN_sub(priv_key,priv_key,dsa->q); if (!BN_is_zero(priv_key)) break; |