[Python-checkins] python/dist/src/Objects typeobject.c, 2.268, 2.269
arigo@users.sourceforge.net
arigo at users.sourceforge.net
Sun Sep 25 00:58:44 CEST 2005
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28175
Modified Files:
typeobject.c
Log Message:
(pedronis, arigo)
segfault when a class contain a non-list value in the (undocumented)
special attribute __slotnames__.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.268
retrieving revision 2.269
diff -u -d -r2.268 -r2.269
--- typeobject.c 20 Sep 2005 18:49:54 -0000 2.268
+++ typeobject.c 24 Sep 2005 22:58:41 -0000 2.269
@@ -2522,7 +2522,7 @@
clsdict = ((PyTypeObject *)cls)->tp_dict;
slotnames = PyDict_GetItemString(clsdict, "__slotnames__");
- if (slotnames != NULL) {
+ if (slotnames != NULL && PyList_Check(slotnames)) {
Py_INCREF(slotnames);
return slotnames;
}
More information about the Python-checkins
mailing list