X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Frand%2Frandfile.c;h=ba121eefbf09ddd05066b9e8c071e86bab7137e3;hb=2459dc1bd09468c83f1767b6b6a1ddc45ba60d36;hp=45d20e5c03d715c011d0e8fe902057705b765daa;hpb=1d0671b81f18385ee6e73eed12b27fb25f27c67d;p=oweals%2Fopenssl.git diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 45d20e5c03..ba121eefbf 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -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; } @@ -254,7 +254,7 @@ const char *RAND_file_name(char *buf, size_t size) size_t len; int use_randfile = 1; -#if defined(_WIN32) && defined(CP_UTF8) +#if defined(_WIN32) && defined(CP_UTF8) && !defined(_WIN32_WCE) DWORD envlen; WCHAR *var;