[issue22518] integer overflow in encoding unicode

Serhiy Storchaka report at bugs.python.org
Tue Sep 30 16:01:31 CEST 2014


Serhiy Storchaka added the comment:

> Ooops, wrong issue, the test is : ("\uffff" * (2**29)).encode("latin1",
> errors="xmlcharrefreplace").

("\uffff" * (sys.maxsize//8+1)).encode("latin1", errors="xmlcharrefreplace")

or

("\xff" * (sys.maxsize//6+1)).encode("ascii", errors="xmlcharrefreplace")

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22518>
_______________________________________


More information about the Python-bugs-list mailing list