消息 [325284]
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 :-) |
|
| 日期 |
用户 |
动作 |
参数 |
| 2018-09-13 18:54:21 | vstinner | 修改 | 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 | 修改 | messageid: <1536864861.6.0.956365154283.issue1621@psf.upfronthosting.co.za> |
| 2018-09-13 18:54:21 | vstinner | 链接 | issue1621 messages |
| 2018-09-13 18:54:21 | vstinner | 创建 | |
|