]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/speed.c
Added check for the return value of the RAND_bytes() function
[thirdparty/openssl.git] / apps / speed.c
index 88d389523b3780a18b17a6afddd2d7c39f223b5f..44e3af7591453ec4b769335a0e2e1db18198cca7 100644 (file)
@@ -4747,7 +4747,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher, int lengths_single,
             } else {
                 int pad;
 
-                RAND_bytes(out, 16);
+                if (RAND_bytes(inp, 16) <= 0)
+                    app_bail_out("error setting random bytes\n");
                 len += 16;
                 aad[11] = (unsigned char)(len >> 8);
                 aad[12] = (unsigned char)(len);