[issue16991] Add OrderedDict written in C
Christian Heimes
report at bugs.python.org
Mon Jun 1 17:00:25 CEST 2015
Christian Heimes added the comment:
Coverity has found an issue in odict, too:
*** CID 1302699: Null pointer dereferences (NULL_RETURNS)
/Objects/odictobject.c: 1316 in odict_copy()
1310 od_copy = PyObject_CallFunctionObjArgs((PyObject *)Py_TYPE(od), NULL);
1311 if (od_copy == NULL)
1312 return NULL;
1313
1314 if (PyODict_CheckExact(od)) {
1315 _odict_FOREACH(od, node) {
>>> CID 1302699: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be null "PyDict_GetItem((PyObject *)(PyObject *)od, node->key)" when calling "PyODict_SetItem".
1316 int res = PyODict_SetItem((PyObject *)od_copy,
1317 _odictnode_KEY(node),
1318 _odictnode_VALUE(node, od));
1319 if (res != 0)
1320 goto fail;
1321 }
----------
nosy: +christian.heimes
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16991>
_______________________________________
More information about the Python-bugs-list
mailing list