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
51eba611
Commit
51eba611
authored
Aug 30, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32_urandom(): Raise ValueError if the argument is negative.
parent
4ad8217a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
Modules/posixmodule.c
Modules/posixmodule.c
+3
-0
No files found.
Modules/posixmodule.c
View file @
51eba611
...
...
@@ -7246,6 +7246,9 @@ win32_urandom(PyObject *self, PyObject *args)
/* Read arguments */
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
howMany
))
return
NULL
;
if
(
howMany
<
0
)
return
PyErr_Format
(
PyExc_ValueError
,
"negative argument not allowed"
);
if
(
hCryptProv
==
0
)
{
HINSTANCE
hAdvAPI32
=
NULL
;
...
...
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