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
35503c9c
Commit
35503c9c
authored
Aug 20, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
Patch by Robin Schreiber.
parents
66d1eb23
75506e8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Misc/NEWS
Misc/NEWS
+3
-0
Python/pystate.c
Python/pystate.c
+1
-1
No files found.
Misc/NEWS
View file @
35503c9c
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.3.0 Release Candidate 1?
Core and Builtins
-----------------
- Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
Patch by Robin Schreiber.
- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
errors correctly. Patch by Serhiy Storchaka.
...
...
Python/pystate.c
View file @
35503c9c
...
...
@@ -248,7 +248,7 @@ PyState_FindModule(struct PyModuleDef* module)
return
NULL
;
if
(
state
->
modules_by_index
==
NULL
)
return
NULL
;
if
(
index
>
PyList_GET_SIZE
(
state
->
modules_by_index
))
if
(
index
>
=
PyList_GET_SIZE
(
state
->
modules_by_index
))
return
NULL
;
res
=
PyList_GET_ITEM
(
state
->
modules_by_index
,
index
);
return
res
==
Py_None
?
NULL
:
res
;
...
...
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