Message381865
PyObject_AsCharBuffer() is dangerous: it returns a dangling pointer by design. PyObject_GetBuffer() design is safer: the API ensures that the buffer remains valid until PyBuffer_Release() is called.
PyQt5 was updated to use the safe PyObject_GetBuffer()/PyBuffer_Release(). PyQt4 is no longer updated, that's why I proposed a downstream fix which copy/paste the old code. Changing PyQt4 to use the safe API was not worth it, since it's complex to redesign the impacted function qpycore_encode(). |
|
| Date |
User |
Action |
Args |
| 2020-11-25 21:24:44 | vstinner | set | recipients:
+ vstinner, methane, hroncok |
| 2020-11-25 21:24:44 | vstinner | set | messageid: <[email protected]> |
| 2020-11-25 21:24:44 | vstinner | link | issue41103 messages |
| 2020-11-25 21:24:44 | vstinner | create | |
|