mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-30640: Fix undefined behavior in _PyFunction_FastCallDict() and PyEval_EvalCodeEx() (#2919)
k + 1 was calculated with k = NULL.
This commit is contained in:
parent
a568e52733
commit
c6ea8974e2
2 changed files with 3 additions and 2 deletions
|
@ -374,7 +374,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
|
|||
|
||||
result = _PyEval_EvalCodeWithName((PyObject*)co, globals, (PyObject *)NULL,
|
||||
args, nargs,
|
||||
k, k + 1, nk, 2,
|
||||
k, k != NULL ? k + 1 : NULL, nk, 2,
|
||||
d, nd, kwdefs,
|
||||
closure, name, qualname);
|
||||
Py_XDECREF(kwtuple);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue