summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-15 00:20:32 +0800
committerPauli <pauli@openssl.org>2021-11-16 20:01:57 +1000
commit1373090503ecdcc93623218913477113d34883e1 (patch)
treef9ec145ed66f2ef9dcbc488bce125e1324810c3a /ssl
parent0b7dc2f52ba6c4b100284008fbd259f07687ad6f (diff)
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) (cherry picked from commit c9007bda79291179ed2df31b3dfd9f1311102847)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/record/tls_pad.c2
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))