[issue34912] Update overflow checks in resize_buffer
Stefan Behnel
report at bugs.python.org
Sun Oct 14 09:13:24 EDT 2018
Stefan Behnel <stefan_ml at behnel.de> added the comment:
If I understand the code right, "PY_SSIZE_T_MAX/sizeof(Py_UCS4)" would not be correct since it would unnecessarily limit the length of ASCII-only unicode strings.
I think the initial check avoids the risk of integer overflow in the calculations below, so it's not entirely redundant.
----------
nosy: +scoder
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34912>
_______________________________________
More information about the Python-bugs-list
mailing list