Message92143
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? |
|
Date |
User |
Action |
Args |
2009-09-01 21:58:41 | boya | set | recipients:
+ boya, lemburg, loewis, barry, teoliphant, amaury.forgeotdarc, pitrou, donmez, benjamin.peterson, gpolo |
2009-09-01 21:58:41 | boya | set | messageid: <1251842321.0.0.900152162953.issue3139@psf.upfronthosting.co.za> |
2009-09-01 21:58:39 | boya | link | issue3139 messages |
2009-09-01 21:58:38 | boya | create | |
|