Kaydet (Commit) ec862b90 authored tarafından Armin Rigo's avatar Armin Rigo

(pedronis, arigo)

segfault when a class contain a non-list value in the (undocumented)
special attribute __slotnames__.
üst 6b27cda6
...@@ -2522,7 +2522,7 @@ slotnames(PyObject *cls) ...@@ -2522,7 +2522,7 @@ slotnames(PyObject *cls)
clsdict = ((PyTypeObject *)cls)->tp_dict; clsdict = ((PyTypeObject *)cls)->tp_dict;
slotnames = PyDict_GetItemString(clsdict, "__slotnames__"); slotnames = PyDict_GetItemString(clsdict, "__slotnames__");
if (slotnames != NULL) { if (slotnames != NULL && PyList_Check(slotnames)) {
Py_INCREF(slotnames); Py_INCREF(slotnames);
return slotnames; return slotnames;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment