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 Windson Yang
Recipients Windson Yang
Date 2018-10-06.05:31:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In [resize_buffer](

    /* For simplicity, stay in the range of the signed type. Anyway, Python
       doesn't allow strings to be longer than this. */
    if (size > PY_SSIZE_T_MAX)
        goto overflow;

IMO, we should check the overflow with

    if (size > PY_SSIZE_T_MAX/sizeof(Py_UCS4))

Or we can just delete this code because we will check later at [alloc_check](

BTW, I found we only use PY_SIZE_MAX here in CPython, I wonder why we do not use PY_SSIZE_T_MAX instead?
Date User Action Args
2018-10-06 05:31:56Windson Yangsetrecipients: + Windson Yang
2018-10-06 05:31:56Windson Yangsetmessageid: <>
2018-10-06 05:31:56Windson Yanglinkissue34912 messages
2018-10-06 05:31:56Windson Yangcreate