[New-bugs-announce] [issue19279] UTF-7 to UTF-8 decoding crash

Guillaume Lebourgeois report at bugs.python.org
Thu Oct 17 11:55:36 CEST 2013

New submission from Guillaume Lebourgeois:

After the fetch of a webpage with a wrongly declared encoding, the use of codecs module for a conversion crashes.

The issue is reproducible this way : 

>>> content = b"+1911\' rel=\'stylesheet\' type=\'text/css\' />\n<link rel="alternate" type="application/rss+xml"
>>> codecs.utf_7_decode(content, "replace", True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: invalid maximum character passed to PyUnicode_New

Original issue here  : https://github.com/kennethreitz/requests/issues/1682

components: Library (Lib)
messages: 200117
nosy: glebourgeois
priority: normal
severity: normal
status: open
title: UTF-7 to UTF-8 decoding crash
type: crash
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list