STINNER Victor <[email protected]> added the comment:
Benjamin: what do you think of adding an explicit check after the "new_size <<=
1;" loop?
if (new_size > (size_t)PY_SSIZE_T_MAX) {
PyErr_NoMemory();
return -1;
}
Technically, PyMem_Malloc() already implements the check, so it's not really
needed. So I'm not sure if it's needed :-)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue1621>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com