]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of rev 2.199 from trunk.
authorGuido van Rossum <guido@python.org>
Wed, 19 Feb 2003 03:52:47 +0000 (03:52 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 19 Feb 2003 03:52:47 +0000 (03:52 +0000)
PyObject_Generic{Get,Set}Attr:

Don't access tp_descr_{get,set} of a descriptor without checking the
flag bits of the descriptor's type.  While we know that the main type
(the type of the object whose attribute is being accessed) has all the
right flag bits (or else PyObject_Generic{Get,Set}Attr wouldn't be
called), we don't know that for its class attributes!

Misc/NEWS

index 6b1d0094a6651f6becd6713e9c517dfcff0bb470..dc77362cd0830833f49b0f3edf8a604fc39c3367 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2,6 +2,11 @@ What's New in Python 2.2.3 ?
 Release date: XX-XXX-2003
 ============================
 
+- Fixed two places in PyObject_Generic{Get,Set}Attr() where the
+  tp_descr_{get,set} slot of a descriptor's type was accessed without
+  checking tp_flags whether those slots actually exist.  This could
+  cause segfaults in Zope.
+
 - The imp module now has ways to acquire and release the "import
   lock": imp.acquire_lock() and imp.release_lock().  Note: this is a
   reentrant lock, so releasing the lock only truly releases it when