Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
370f5136
Commit
370f5136
authored
Jun 14, 2016
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.5 (os.urandom, issue #27278)
parents
673ac274
b98a36e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Misc/NEWS
Misc/NEWS
+4
-0
Python/random.c
Python/random.c
+1
-1
No files found.
Misc/NEWS
View file @
370f5136
...
...
@@ -10,6 +10,10 @@ What's New in Python 3.6.0 alpha 3
Library
-------
- 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.
- Issue #16864: sqlite3.Cursor.lastrowid now supports REPLACE statement.
Initial patch by Alex LordThorsen.
...
...
Python/random.c
View file @
370f5136
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment