Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16975
Roundup Robot added the comment:
New changeset 5970c90dd8d1 by Serhiy Storchaka in branch '2.7':
Issue #16975: Fix error handling bug in the escape-decode decoder.
http://hg.python.org/cpython/rev/5970c90dd8d1
New changeset 22594c5060eb by Serhiy Storchaka in branch '3.2':
Issue #16975: Fix
Serhiy Storchaka added the comment:
See also issue16979.
--
assignee: - serhiy.storchaka
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16975
___
Serhiy Storchaka added the comment:
Here is a patch which fixes error handling in codecs.escape_decode().
codecs.escape_decode(r'[\x1]\x2', 'replace')
(b'[?]?', 8)
New tests for escape_decode() added.
--
keywords: +patch
nosy: +doerwalter, lemburg
stage: needs patch - patch review
Changes by Serhiy Storchaka storch...@gmail.com:
Added file:
http://bugs.python.org/file28750/escape_decode_error_handling-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16975
___
New submission from Serhiy Storchaka:
import codecs
codecs.escape_decode(r'\x1\x2\x3\x4\x5\x6\x7\x8\x9', 'replace')
(b'?\\x1?\\x2?\\x3?\\x4?\\x5?\\x6?\\x', 27)
codecs.escape_decode(r'\x1\x2\x3\x4\x5\x6\x7\x8\x9' * 1000, 'replace')
Segmentation fault
--
components: Interpreter Core