summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-06-14 14:33:17 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-06-14 14:33:17 (GMT)
commit370f5136d4c82778eabd9d808f6e73f6b9a8fad4 (patch)
treecd3bb79b778b554d8ef280f55dcf46132474f432 /Python
parent673ac2749943d4077137984a640e8f6eb2f43a26 (diff)
parentb98a36e8f3006512f0fa4d94309fb9918eb8abdd (diff)
downloadcpython-370f5136d4c82778eabd9d808f6e73f6b9a8fad4.zip
cpython-370f5136d4c82778eabd9d808f6e73f6b9a8fad4.tar.gz
cpython-370f5136d4c82778eabd9d808f6e73f6b9a8fad4.tar.bz2
Merge 3.5 (os.urandom, issue #27278)
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;