X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Frand%2Frandfile.c;h=7dde54b18726ca1f2a5319924f1f33532703856a;hp=45d20e5c03d715c011d0e8fe902057705b765daa;hb=705536e2b5c4167dbda2e0046d83f9e0f4a65514;hpb=6ec6448b9368b581d712514366c38b359ccff2f4 diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index 45d20e5c03..7dde54b187 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -1,7 +1,7 @@ /* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -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;