[Python-checkins] [3.11] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105676)
erlend-aasland
webhook-mailer at python.org
Mon Jun 12 05:13:23 EDT 2023
https://github.com/python/cpython/commit/171aa086f27e581bfcf2288d5afd0167480ef3cb
commit: 171aa086f27e581bfcf2288d5afd0167480ef3cb
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2023-06-12T09:13:03Z
summary:
[3.11] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105676)
In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit a8d69fe92c65d636fc454cfb1825c357eb2e6325)
Co-authored-by: Nikita Sobolev <mail at sobolevn.me>
files:
M Python/sysmodule.c
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 84f17389559c..6e9ec90c9d1c 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -3020,7 +3020,7 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict)
static int
sys_add_xoption(PyObject *opts, const wchar_t *s)
{
- PyObject *name, *value;
+ PyObject *name, *value = NULL;
const wchar_t *name_end = wcschr(s, L'=');
if (!name_end) {
More information about the Python-checkins
mailing list