Skip to content

Commit 35142b1

Browse files
gkirchounote35
andauthored
gh-142168: explicitly initialize stack_array in _PyEval_Vector and _PyEvalFramePushAndInit_Ex (#142192)
Co-authored-by: Kir Chou <note351@hotmail.com>
1 parent 0ed56ed commit 35142b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/ceval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,7 @@ _PyEvalFramePushAndInit_Ex(PyThreadState *tstate, _PyStackRef func,
23442344
PyObject *kwnames = NULL;
23452345
_PyStackRef *newargs;
23462346
PyObject *const *object_array = NULL;
2347-
_PyStackRef stack_array[8];
2347+
_PyStackRef stack_array[8] = {0};
23482348
if (has_dict) {
23492349
object_array = _PyStack_UnpackDict(tstate, _PyTuple_ITEMS(callargs), nargs, kwargs, &kwnames);
23502350
if (object_array == NULL) {
@@ -2407,7 +2407,7 @@ _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
24072407
if (kwnames) {
24082408
total_args += PyTuple_GET_SIZE(kwnames);
24092409
}
2410-
_PyStackRef stack_array[8];
2410+
_PyStackRef stack_array[8] = {0};
24112411
_PyStackRef *arguments;
24122412
if (total_args <= 8) {
24132413
arguments = stack_array;

0 commit comments

Comments
 (0)