[issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV()

2009-05-03 Thread STINNER Victor
STINNER Victor added the comment: > The problem with your patch is that it calls PyUnicode_DecodeUTF8() twice I read your patch: storing the decoded string is the right way to do that, but i didn't noticed the "callresult stack". > Could you test this new version to see if there's still a Va

[issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV()

2009-05-03 Thread Walter Dörwald
Walter Dörwald added the comment: Checked in: r72260 (trunk) r72262 (release26-maint) r72265 (py3k) r72266 (release30-maint) -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV()

2009-04-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> critical stage: -> patch review type: -> crash ___ Python tracker ___ ___ Python-bugs-li

[issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV()

2009-04-09 Thread Walter Dörwald
Walter Dörwald added the comment: The problem with your patch is that it calls PyUnicode_DecodeUTF8() twice. It would be better if step 1 in the code would include the %s format specifiers and step 3 would then call PyUnicode_DecodeUTF8() and put the result into the callresults buffer. BTW, I c

[issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV()

2009-01-30 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file12892/unicode_format.patch ___ Python tracker ___ __

[issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV()

2009-01-30 Thread STINNER Victor
New submission from STINNER Victor : PyUnicode_FromFormatV() doesn't count correctly the unicode length of an UTF-8 string. Commit r57837 "Change %s argument for PyUnicode_FromFormat to be UTF-8. Fixes #1070." introduced the bug. To compute the length, it uses a a complex code to compute the l