From: Dr. Matthias St. Pierre Date: Sun, 28 Oct 2018 12:32:11 +0000 (+0100) Subject: randfile.c: fix a Coverity warning X-Git-Tag: openssl-3.0.0-alpha1~3005 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=040a03470c7c5bf95fe8e6143db7bef357a22833;p=oweals%2Fopenssl.git randfile.c: fix a Coverity warning Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/7510) --- 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; }