[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Guido van Rossum
Changes by Guido van Rossum: -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: Better fix: Committed revision 58708. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscrib

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't like this assert either: this function is part of the public API, and should not crash the interpreter just because of a trailing \. To test easily: import ctypes decode = ctypes.pythonapi.PyUnicodeUCS2_DecodeUnicodeEscape decode.restype = ctypes.

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: (Hold on, the assert I added triggers in debug mode.) -- status: closed -> open __ Tracker <[EMAIL PROTECTED]> __ __

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks!! The patch as given doesn't quite work -- it gives an error message on string literals like '\s'. By reverting some of your code and only keeping the bounds checks for the octal escape code I got it to work though. See my checkin. Committed revision

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: A correction for the problem found by GvR in change 58692: > There's one mystery: if I remove ob_sstate from the PyStringObject struct, > some (unicode) string literals are mutilated, e.g. ('\\1', '\1') prints > ('\\1', '\t'). This must be an out of bou