Message259242
Rather rare reference leak is not the worst bug here.
Following example
const char *s = ...;
PyObject *b = PyBytes_New(...);
return PyBuildValue("(Ns)s", b, s, PyBytes_AS_STRING(b));
works if s is correct UTF-8 encoded string. But if it is not correct UTF-8 encoded string, the first "s" is failed and the inner tuple is deallocated together with the borrowed reference to b. The second "s" then reads freed memory. |
|
Date |
User |
Action |
Args |
2016-01-30 07:39:25 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, martin.panter, josh.r, squidevil |
2016-01-30 07:39:25 | serhiy.storchaka | set | messageid: <1454139565.76.0.737593625317.issue26168@psf.upfronthosting.co.za> |
2016-01-30 07:39:25 | serhiy.storchaka | link | issue26168 messages |
2016-01-30 07:39:25 | serhiy.storchaka | create | |
|