#340 Lib/python/pyrun.swg generates uninitialized variable return

None
closed
nobody
None
5
2013-07-01
2013-06-13
Mike
No

index 7cf9c41..4ce0562 100644
If "goto done" taken, res is not set.

--- a/Lib/python/pyrun.swg
+++ b/Lib/python/pyrun.swg
@@ -1759,13 +1759,13 @@ SWIG_Python_NonDynamicSetAttr(PyObject obj, PyObject name, PyObject *valu
} else {
Py_INCREF(name);
}
+ res = -1;

if (!tp->tp_dict) {
if (PyType_Ready(tp) < 0)
goto done;
}

  • res = -1;
    descr = _PyType_Lookup(tp, name);
    f = NULL;
    if (descr != NULL)

Discussion

  • William Fulton

    William Fulton - 2013-07-01
    • status: open --> closed
    • Group: -->
     
  • William Fulton

    William Fulton - 2013-07-01

    Thanks, applied for swig-2.0.11.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks