From c7a7ed3870e51a91379aaddad2da3be0aba1daf6 Mon Sep 17 00:00:00 2001 From: "Dr. Matthias St. Pierre" Date: Sun, 28 Oct 2018 13:32:11 +0100 Subject: [PATCH] randfile.c: fix a Coverity warning Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/7510) (cherry picked from commit 040a03470c7c5bf95fe8e6143db7bef357a22833) --- crypto/rand/randfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 45d20e5c03..1b737d1ba2 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -110,7 +110,7 @@ int RAND_load_file(const char *file, long bytes) if (bytes < 0) { if (S_ISREG(sb.st_mode)) - bytes = (sb.st_size <= LONG_MAX) ? sb.st_size : LONG_MAX; + bytes = sb.st_size; else bytes = RAND_DRBG_STRENGTH; } -- 2.34.1