BUG: classobject.c

Adrian Eyre a.eyre at optichrome.com
Fri Oct 8 10:32:16 EDT 1999


3 lines starting at 1554:
		funcname = PyObject_GetAttrString(func,"__name__");
		if (funcname == NULL)
			PyErr_Clear();

should be (perhaps - not sure if this will leak or not):
		funcname = PyObject_GetAttrString(func,"__name__");
		if (funcname == NULL)
			PyErr_Clear();
		else
			Py_INCREF(funcname);

or else - line 1562:
	Py_XDECREF(funcname);

causes an free'd memory read (fname) at line 1567:
	if (self == NULL)
		sprintf(buf, "<unbound method %.100s.%.100s>", fcname, fname);

--------------------------------------------
Adrian Eyre <mailto:a.eyre at optichrome.com>
Optichrome Computer Solutions Ltd
Maybury Road, Woking, Surrey, GU21 5HX, UK
Tel: +44 1483 740 233  Fax: +44 1483 760 644
http://www.optichrome.com 
--------------------------------------------





More information about the Python-list mailing list