summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-06-16 22:01:30 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-06-16 22:01:30 (GMT)
commita63073a807d52df8d808c9409d0f284b3d61a20a (patch)
tree8fc15098d40e4f9a8437296ecab4e849ec37ba79
parent74108614b1659f0ae80d638199d81db244d3de6a (diff)
parentec721f3305c04b5d136e2d21cb73c5bdfdd81684 (diff)
downloadcpython-a63073a807d52df8d808c9409d0f284b3d61a20a.zip
cpython-a63073a807d52df8d808c9409d0f284b3d61a20a.tar.gz
cpython-a63073a807d52df8d808c9409d0f284b3d61a20a.tar.bz2
Merge 3.5
-rw-r--r--Python/random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/random.c b/Python/random.c
index 8a83fe9..c8e844e 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -134,7 +134,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
const int flags = GRND_NONBLOCK;
char *dest;
- int n;
+ long n;
if (!getrandom_works)
return 0;
@@ -146,7 +146,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int raise)
to 1024 bytes */
n = Py_MIN(size, 1024);
#else
- n = Py_MIN(size, INT_MAX);
+ n = Py_MIN(size, LONG_MAX);
#endif
errno = 0;