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
c6ea8974
Commit
c6ea8974
authored
Jul 31, 2017
by
Zackery Spytz
Committed by
Serhiy Storchaka
Jul 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and PyEval_EvalCodeEx() (#2919)
k + 1 was calculated with k = NULL.
parent
a568e527
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Objects/call.c
Objects/call.c
+1
-1
Python/ceval.c
Python/ceval.c
+2
-1
No files found.
Objects/call.c
View file @
c6ea8974
...
@@ -374,7 +374,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
...
@@ -374,7 +374,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
result
=
_PyEval_EvalCodeWithName
((
PyObject
*
)
co
,
globals
,
(
PyObject
*
)
NULL
,
result
=
_PyEval_EvalCodeWithName
((
PyObject
*
)
co
,
globals
,
(
PyObject
*
)
NULL
,
args
,
nargs
,
args
,
nargs
,
k
,
k
+
1
,
nk
,
2
,
k
,
k
!=
NULL
?
k
+
1
:
NULL
,
nk
,
2
,
d
,
nd
,
kwdefs
,
d
,
nd
,
kwdefs
,
closure
,
name
,
qualname
);
closure
,
name
,
qualname
);
Py_XDECREF
(
kwtuple
);
Py_XDECREF
(
kwtuple
);
...
...
Python/ceval.c
View file @
c6ea8974
...
@@ -4220,7 +4220,8 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
...
@@ -4220,7 +4220,8 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
{
{
return
_PyEval_EvalCodeWithName
(
_co
,
globals
,
locals
,
return
_PyEval_EvalCodeWithName
(
_co
,
globals
,
locals
,
args
,
argcount
,
args
,
argcount
,
kws
,
kws
+
1
,
kwcount
,
2
,
kws
,
kws
!=
NULL
?
kws
+
1
:
NULL
,
kwcount
,
2
,
defs
,
defcount
,
defs
,
defcount
,
kwdefs
,
closure
,
kwdefs
,
closure
,
NULL
,
NULL
);
NULL
,
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