Message243739
PyObject_IsInstance() is used incorrectly for testing if Python object is an instance of specified builtin type before direct access to internals of object. This is not correct, because PyObject_IsInstance() checks the __class__ attribute that can be modified and even can be dynamic property. Correct way is to check static type. Proposed patch replaces PyObject_IsInstance() with PyObject_TypeCheck() if this is appropriate.
See also similar issues issue24102 and issue24091. |
|
Date |
User |
Action |
Args |
2015-05-21 08:40:46 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2015-05-21 08:40:46 | serhiy.storchaka | set | messageid: <1432197646.74.0.848752631202.issue24257@psf.upfronthosting.co.za> |
2015-05-21 08:40:46 | serhiy.storchaka | link | issue24257 messages |
2015-05-21 08:40:46 | serhiy.storchaka | create | |
|