Message325284
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 :-) |
|
| Date |
User |
Action |
Args |
| 2018-09-13 18:54:21 | vstinner | set | recipients:
+ vstinner, loewis, nnorwitz, jcea, mark.dickinson, pitrou, alexandre.vassalotti, donmez, matejcik, jwilk, alex, dmalcolm, python-dev, deadshort, martin.panter, serhiy.storchaka, ztane, fweimer, Jeffrey.Walton, xiang.zhang, sir-sigurd, miss-islington |
| 2018-09-13 18:54:21 | vstinner | set | messageid: <[email protected]> |
| 2018-09-13 18:54:21 | vstinner | link | issue1621 messages |
| 2018-09-13 18:54:21 | vstinner | create | |
|