[issue22518] integer overflow in encoding unicode

STINNER Victor report at bugs.python.org
Tue Sep 30 15:05:37 CEST 2014


STINNER Victor added the comment:

> New changeset f86fde20e9ce by Benjamin Peterson in branch 'default':
> merge 3.4 (closes #22518)
> https://hg.python.org/cpython/rev/f86fde20e9ce

This changeset added ">>>> other". It looks like you commited a conflict.

-        if (requiredsize<2*outsize)
+        if (outsize <= PY_SSIZE_T_MAX/2 && requiredsize < 2*outsize)
             requiredsize = 2*outsize;

I'm not sure that this change is correct. Why not raising an exception on overflow?

----------
nosy: +haypo

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


More information about the Python-bugs-list mailing list