Boya Sun <boya....@case.edu> added the comment: Although the bug is fixed, the following three code segments seems suspicious in _codecsmodule.c in the latest revision 74624, and they are similar to the bug described here:
(1) escape_decode(PyObject *self, PyObject *args) { ... const char *data; ... if (!PyArg_ParseTuple(args, "s#|z:escape_decode", &data, &size, &errors)) } (2) readbuffer_encode(PyObject *self, PyObject *args) { const char *data; ... if (!PyArg_ParseTuple(args, "s#|z:readbuffer_encode", &data, &size, &errors)) ... } (3) charbuffer_encode(PyObject *self, PyObject *args) { const char *data; ... if (!PyArg_ParseTuple(args, "t#|z:charbuffer_encode", &data, &size, &errors)) ... } Firstly, "char *data;" have been replaced by "Py_buffer pbuf;" in many procedures in this file in the bug fix, but these code did not; Secondly, they uses "s#" or "t#" which should probably changed to "s*"; I could be wrong about it. Does anyone have any opinions on the above code? Are they really buggy or am I misunderstanding anything? ---------- nosy: +boya _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com