[issue2298] Patch for string without null bytes check in getargs.c

2008-03-21 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I've added XXX comments to the code, so this is now tracked by #2322. -- nosy: +georg.brandl resolution: - duplicate status: open - closed superseder: - Clean up getargs.c and its formatting possibilities

[issue2298] Patch for string without null bytes check in getargs.c

2008-03-17 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Yes, that sounds like a good idea. Although I haven't reviewed this patch yet, I find the naming of the `ustr` variable confusing -- e.g. is it a bytes object or a unicode object? (It seems to be bytes). Anyway, I will check this out

[issue2298] Patch for string without null bytes check in getargs.c

2008-03-17 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: On Mon, Mar 17, 2008 at 9:51 AM, Alexandre Vassalotti [EMAIL PROTECTED] wrote: Alexandre Vassalotti [EMAIL PROTECTED] added the comment: .. Although I haven't reviewed this patch yet, I find the naming of the `ustr` variable

[issue2298] Patch for string without null bytes check in getargs.c

2008-03-17 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: There is now issue2322 (Clean up getargs.c and its formatting possibilities) related to this. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2298 __

[issue2298] Patch for string without null bytes check in getargs.c

2008-03-16 Thread Douglas Greiman
New submission from Douglas Greiman [EMAIL PROTECTED]: 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:

[issue2298] Patch for string without null bytes check in getargs.c

2008-03-16 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: Note that this patch will expose a bug fixed in issue1950. (See msg63363.) I suggest that the import.c part of issue1950 and this go together. Alexandre? -- nosy: +alexandre.vassalotti, belopolsky