This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jafo
Recipients jafo
Date 2009-08-01.23:53:34
SpamBayes Score 1.6810347e-08
Marked as misclassified No
Message-id <1249170824.71.0.297411055704.issue6624@psf.upfronthosting.co.za>
In-reply-to
Content
As detailed in the python-dev post:

   http://mail.python.org/pipermail/python-dev/2009-July/090791.html

I have found a bug in the handling of PyArg_ParseTuple where a NUL in an
argument causes a message like this:

   syslog.syslog('hello\0there')
   TypeError: [priority,] message string

Instead of:

   TypeError: must be string without null bytes, not str

This seems to be a thinko in Python/getargs.c at line 331:

   msg = convertitem(PyTuple_GET_ITEM(args, i), &format, p_va,
        flags, levels, msgbuf,
        sizeof(msgbuf), &freelist);
   if (msg) {
      seterror(i+1, msg, levels, fname, message);   <<< Line 331
      return cleanreturn(0, freelist);
   }

This also applies to Python 3 trunk in line 390.

I think that's supposed to be "msg" instead of "message" in the last
argument.

I have made this change and "make test" for both python and py3k trunks
is clean.
History
Date User Action Args
2009-08-01 23:53:44jafosetrecipients: + jafo
2009-08-01 23:53:44jafosetmessageid: <1249170824.71.0.297411055704.issue6624@psf.upfronthosting.co.za>
2009-08-01 23:53:35jafolinkissue6624 messages
2009-08-01 23:53:34jafocreate