]> granicus.if.org Git - python/commit
Fix os.urandom() using getrandom() on Linux
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 14 Jun 2016 14:31:35 +0000 (16:31 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 14 Jun 2016 14:31:35 +0000 (16:31 +0200)
commitb98a36e8f3006512f0fa4d94309fb9918eb8abdd
tree70145e9fc9f6bb7e0698abf2798f23e71a000681
parentfd7f19ea67b0585929e723303c40de9153bba91d
Fix os.urandom() using getrandom() on Linux

Issue #27278: Fix os.urandom() implementation using getrandom() on Linux.
Truncate size to INT_MAX and loop until we collected enough random bytes,
instead of casting a directly Py_ssize_t to int.
Misc/NEWS
Python/random.c