Author dgreiman
Recipients dgreiman
Date 2008-03-16.06:00:36
SpamBayes Score 0.148017
Marked as misclassified No
Message-id <1205647240.0.0.304059938651.issue2298@psf.upfronthosting.co.za>
In-reply-to
Content
Code in getargs.c:convertsimple incorrectly uses PyUnicode_GetSize
instead of PyString_GET_SIZE when checking whether a bytes object
(encoded string) contains a null byte.

To reproduce: __import__('\u0080')
Incorrect behavior:
  TypeError: __import__() argument 1 must be string without null bytes,
not str
Correct behavior: 
  ImportError

Note the lack of null bytes:
  >>> '\u0080'.encode('utf-8')
  b'\xc2\x80'
History
Date User Action Args
2008-03-16 06:00:40dgreimansetspambayes_score: 0.148017 -> 0.148017
recipients: + dgreiman
2008-03-16 06:00:40dgreimansetspambayes_score: 0.148017 -> 0.148017
messageid: <1205647240.0.0.304059938651.issue2298@psf.upfronthosting.co.za>
2008-03-16 06:00:38dgreimanlinkissue2298 messages
2008-03-16 06:00:37dgreimancreate