This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients hroncok, methane, vstinner
Date 2020-11-25.21:24:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:44vstinnersetrecipients: + vstinner, methane, hroncok
2020-11-25 21:24:44vstinnersetmessageid: <>
2020-11-25 21:24:44vstinnerlinkissue41103 messages
2020-11-25 21:24:44vstinnercreate