summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/libc/getentropy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/libc/getentropy.cc')
-rw-r--r--winsup/cygwin/libc/getentropy.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/libc/getentropy.cc b/winsup/cygwin/libc/getentropy.cc
index 5918eb5d9..c358b5287 100644
--- a/winsup/cygwin/libc/getentropy.cc
+++ b/winsup/cygwin/libc/getentropy.cc
@@ -51,7 +51,7 @@ getrandom (void *ptr, size_t len, unsigned int flags)
return -1;
}
/* Max. bytes returned by Linux call. */
- len = MAX (len, (flags & GRND_RANDOM) ? 512 : 33554431);
+ len = MIN (len, (flags & GRND_RANDOM) ? 512 : 33554431);
__try
{
if (!RtlGenRandom (ptr, len))