RAND_bytes_ex: fix return check
[openssl.git] / ssl / record / tls_pad.c
index 528c6055547412d4e93ea448f158ffd0a848b712..e559350461a2a6f8cf0046383ac1f43368478018 100644 (file)
@@ -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))