This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, matejcik, serhiy.storchaka, xiang.zhang
Date 2017-01-07.07:28:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1483774109.55.0.665668268431.issue29145@psf.upfronthosting.co.za>
In-reply-to
Content
The code in PyUnicode_Join() checks on overflow after making an addition.

        sz += PyUnicode_GET_LENGTH(item);
        item_maxchar = PyUnicode_MAX_CHAR_VALUE(item);
        maxchar = Py_MAX(maxchar, item_maxchar);
        if (i != 0)
            sz += seplen;
        if (sz < old_sz || sz > PY_SSIZE_T_MAX) {
            PyErr_SetString(PyExc_OverflowError,
                            "join() result is too long for a Python string");
            goto onError;
        }

Maybe there are other cases.
History
Date User Action Args
2017-01-07 07:28:29serhiy.storchakasetrecipients: + serhiy.storchaka, matejcik, benjamin.peterson, xiang.zhang
2017-01-07 07:28:29serhiy.storchakasetmessageid: <1483774109.55.0.665668268431.issue29145@psf.upfronthosting.co.za>
2017-01-07 07:28:29serhiy.storchakalinkissue29145 messages
2017-01-07 07:28:29serhiy.storchakacreate