Message92143
| Author |
boya |
| Recipients |
amaury.forgeotdarc, barry, benjamin.peterson, boya, donmez, gpolo, lemburg, loewis, pitrou, teoliphant |
| Date |
2009年09月01日.21:58:38 |
| SpamBayes Score |
0.00036048493 |
| Marked as misclassified |
No |
| Message-id |
<1251842321.0.0.900152162953.issue3139@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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? |
|