randfile.c: fix a Coverity warning

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7510)
This commit is contained in:
Dr. Matthias St. Pierre 2018-10-28 13:32:11 +01:00
parent 99540ec794
commit 040a03470c

View File

@ -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;
}