summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/random.c b/Python/random.c
index e4f1e7a..cbdebbe 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -146,7 +146,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
to 1024 bytes */
n = Py_MIN(size, 1024);
#else
- n = size;
+ n = Py_MIN(size, INT_MAX);
#endif
errno = 0;