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.000360485
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?
History
Date User Action Args
2009-09-01 21:58:41boyasetrecipients: + boya, lemburg, loewis, barry, teoliphant, amaury.forgeotdarc, pitrou, donmez, benjamin.peterson, gpolo
2009-09-01 21:58:41boyasetmessageid: <1251842321.0.0.900152162953.issue3139@psf.upfronthosting.co.za>
2009-09-01 21:58:39boyalinkissue3139 messages
2009-09-01 21:58:38boyacreate