[Python-Dev] [Python-checkins] cpython: avoid unitialized memory (original) (raw)
Stefan Krah stefan at bytereef.org
Fri May 4 11:39:51 CEST 2012
- Previous message: [Python-Dev] Python program name
- Next message: [Python-Dev] [Python-checkins] cpython: what is a invalid tuple?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
benjamin.peterson <python-checkins at python.org> wrote:
summary: avoid unitialized memory
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3576,7 +3576,7 @@ splitpylongtosandns(PyObject *pylong, timet *s, long *ns) { int result = 0; - PyObject *divmod; + PyObject *divmod = NULL; divmod = PyNumberDivmod(pylong, billion); if (!divmod) goto exit;
If I'm not mistaken, divmod was already unconditionally initialized by PyNumber_Divmod().
Stefan Krah
- Previous message: [Python-Dev] Python program name
- Next message: [Python-Dev] [Python-checkins] cpython: what is a invalid tuple?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]