diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-26 16:28:59 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-25 12:41:28 +0000 |
commit | 8f8e4e4f5253085ab673bb74094c3e492c56af44 (patch) | |
tree | 1fb6e32d1f10e7ca77521df3a25f887bf083f7a8 /crypto/ecdsa/ecdsatest.c | |
parent | a20718fa2c0a45e6acb975cf6c0438c3ebd45b13 (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/ecdsa/ecdsatest.c')
-rw-r--r-- | crypto/ecdsa/ecdsatest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ecdsa/ecdsatest.c b/crypto/ecdsa/ecdsatest.c index b2d78f3d55..0f301f86d9 100644 --- a/crypto/ecdsa/ecdsatest.c +++ b/crypto/ecdsa/ecdsatest.c @@ -296,8 +296,8 @@ int test_builtin(BIO *out) int nid, ret = 0; /* fill digest values with some random data */ - if (!RAND_pseudo_bytes(digest, 20) || - !RAND_pseudo_bytes(wrong_digest, 20)) { + if (RAND_pseudo_bytes(digest, 20) <= 0 || + RAND_pseudo_bytes(wrong_digest, 20) <= 0) { BIO_printf(out, "ERROR: unable to get random data\n"); goto builtin_err; } |