mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-142168: explicitly initialize stack_array in _PyEval_Vector and _PyEvalFramePushAndInit_Ex (#142192)
Co-authored-by: Kir Chou <note351@hotmail.com>
This commit is contained in:
parent
0ed56ed88f
commit
35142b18ae
1 changed files with 2 additions and 2 deletions
|
|
@ -2344,7 +2344,7 @@ _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, _PyStackRef func,
|
|||
PyObject *kwnames = NULL;
|
||||
_PyStackRef *newargs;
|
||||
PyObject *const *object_array = NULL;
|
||||
_PyStackRef stack_array[8];
|
||||
_PyStackRef stack_array[8] = {0};
|
||||
if (has_dict) {
|
||||
object_array = _PyStack_UnpackDict(tstate, _PyTuple_ITEMS(callargs), nargs, kwargs, &kwnames);
|
||||
if (object_array == NULL) {
|
||||
|
|
@ -2407,7 +2407,7 @@ _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
|
|||
if (kwnames) {
|
||||
total_args += PyTuple_GET_SIZE(kwnames);
|
||||
}
|
||||
_PyStackRef stack_array[8];
|
||||
_PyStackRef stack_array[8] = {0};
|
||||
_PyStackRef *arguments;
|
||||
if (total_args <= 8) {
|
||||
arguments = stack_array;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue