diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2021-11-15 00:20:32 +0800 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-11-16 20:01:13 +1000 |
commit | c9007bda79291179ed2df31b3dfd9f1311102847 (patch) | |
tree | 0da383c0402ddf179b0b687570852806a38a4683 /ssl | |
parent | e48fe798409eb22f067f635c62b9a72e18cd4347 (diff) | |
download | openssl-new-c9007bda79291179ed2df31b3dfd9f1311102847.tar.gz |
RAND_bytes_ex: fix return check
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17032)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/record/tls_pad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/record/tls_pad.c b/ssl/record/tls_pad.c index 528c605554..e559350461 100644 --- a/ssl/record/tls_pad.c +++ b/ssl/record/tls_pad.c @@ -251,7 +251,7 @@ static int ssl3_cbc_copy_mac(size_t *reclen, } /* Create the random MAC we will emit if padding is bad */ - if (!RAND_bytes_ex(libctx, randmac, mac_size, 0)) + if (RAND_bytes_ex(libctx, randmac, mac_size, 0) <= 0) return 0; if (!ossl_assert(mac != NULL && alloced != NULL)) |