diff options
author | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-10-28 13:32:11 +0100 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-10-28 23:35:20 +0100 |
commit | 040a03470c7c5bf95fe8e6143db7bef357a22833 (patch) | |
tree | ab0dcaf3dd83a5046542012a17e9b4f44d16970d /crypto/rand | |
parent | 99540ec79491f59ed8b46b4edf130e17dc907f52 (diff) |
randfile.c: fix a Coverity warning
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7510)
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/randfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |