Message291573
PyObject_Size(), PySequence_Size() and PyMapping_Size() can raise an exception. But not always this is checked after using them. This can lead to a crash. For example:
>>> import io
>>> class R(io.IOBase):
... def readline(self): return None
...
>>> next(R())
Fatal Python error: a function returned a result with an error set
TypeError: object of type 'NoneType' has no len()
The above exception was the direct cause of the following exception:
SystemError: <built-in function next> returned a result with an error set
Current thread 0xb749c700 (most recent call first):
File "<stdin>", line 1 in <module> |
|
Date |
User |
Action |
Args |
2017-04-12 20:58:52 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2017-04-12 20:58:52 | serhiy.storchaka | set | messageid: <1492030732.95.0.492946948296.issue30061@psf.upfronthosting.co.za> |
2017-04-12 20:58:52 | serhiy.storchaka | link | issue30061 messages |
2017-04-12 20:58:52 | serhiy.storchaka | create | |
|