diff options
| author | Kir Chou <148194051+gkirchou@users.noreply.github.com> | 2025-12-06 18:59:52 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-06 18:59:52 (GMT) |
| commit | 35142b18ae3ea0fa7bce04e69a938049ca3da70d (patch) | |
| tree | 3005606cb7af4d5aad2b08e8239c4e77092048bd /Python | |
| parent | 0ed56ed88fc0ed3954cf601d116c7ba134910567 (diff) | |
| download | cpython-35142b18ae3ea0fa7bce04e69a938049ca3da70d.zip cpython-35142b18ae3ea0fa7bce04e69a938049ca3da70d.tar.gz cpython-35142b18ae3ea0fa7bce04e69a938049ca3da70d.tar.bz2 | |
gh-142168: explicitly initialize `stack_array` in `_PyEval_Vector` and `_PyEvalFramePushAndInit_Ex` (#142192)
Co-authored-by: Kir Chou <note351@hotmail.com>
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 46bf644..aadc636 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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; |
