[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Hirokazu, does replacing the following line (rather than changing the type of the `ch` variable): ch = *s; with ch = (unsigned char) *s; fix the crash as well? -- keywords: +patch nosy: +pitrou

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: With this patch? Yes, it fixed crash. Index: Objects/unicodeobject.c === --- Objects/unicodeobject.c (revision 65223) +++ Objects/unicodeobject.c (working copy) @@

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: VS8 and VS9 are immune to the crash, even if the exception message differ between release and debug builds. VC6 crashes, and the proposed patch fixes the problem there as well. -- nosy: +amaury.forgeotdarc

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Selon Hirokazu Yamamoto [EMAIL PROTECTED]: With this patch? Yes, it fixed crash. Thanks! # But I don't know whether this behavior is right or not As the name implies, utf7 is a 7-bit coding of Unicode... bytes = 0x80 must raise an

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Should be fixed in r65227. Please reopen if there's still a problem. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 ___

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: On second thought, perhaps it should also be backported to 2.5, so I'm leaving the bug open. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 ___

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou [EMAIL PROTECTED]: -- resolution: - accepted versions: -Python 2.6, Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 ___

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: I've committed the fix for 2.5 in r65234, can somebody try it out with the failing MSVC version? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 ___

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I confirm that r65234 for 2.5 corrects the crash. (Windows XP, Visual Studio 6) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 ___

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-07-25 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Thanks Amaury! -- resolution: accepted - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 ___

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-03-06 Thread Chris Palmer
Chris Palmer added the comment: You could also fix the problem by using iswalnum function instead of isalnum. Sorry I didn't mention this in the original report. http://msdn2.microsoft.com/en-us/library/k84c0490(VS.71).aspx __ Tracker [EMAIL PROTECTED]

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-03-05 Thread Chris Palmer
New submission from Chris Palmer: When decoding some data as UTF-7 with the optional ignore argument, Python (I am using 2.5.2) crashes. This happens only on Windows Vista (I also tried Py 2.5.1 on Windows XP, Ubuntu 7, and FreeBSD 6). To reproduce, set WinDbg as your post-mortem debugger and

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-03-05 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I reproduced this bug with VC6 + Win2000SP4 + following code. '+\xc1'.decode(utf7, ignore) and this simple patch prevented crash. Index: Objects/unicodeobject.c === --- Objects/unicodeobject.c

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-03-05 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: One more thing. ignore is not needed. '+\xc1'.decode(utf7) crashed my interpreter. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 __

[issue2242] Decoding UTF-7 with ignore warnings crashes Python on Windows Vista

2008-03-05 Thread Georg Brandl
Changes by Georg Brandl: -- priority: - urgent severity: normal - urgent versions: +Python 2.6, Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2242 __ ___