diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-05-23 00:18:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-23 00:18:55 (GMT) |
commit | 367fe5757a707c4e3602dee807a9315199ed0b5c (patch) | |
tree | efa5212fd4caec52007a8dbf6b21c92616c55807 /Lib/email/header.py | |
parent | b73c21c0be7b42de6a88d67408249c8ec46e28f7 (diff) | |
download | cpython-367fe5757a707c4e3602dee807a9315199ed0b5c.zip cpython-367fe5757a707c4e3602dee807a9315199ed0b5c.tar.gz cpython-367fe5757a707c4e3602dee807a9315199ed0b5c.tar.bz2 |
bpo-35091: Objects/listobject.c: Replace overflow checks in gallop fu… (GH-10202)
…nctions with asserts
The actual overflow can never happen because of the following:
* The size of a list can't be greater than PY_SSIZE_T_MAX / sizeof(PyObject*).
* The size of a pointer on all supported plaftorms is at least 4 bytes.
* ofs is positive and less than the list size at the beginning of each iteration.
https://bugs.python.org/issue35091
(cherry picked from commit 6bc5917903b722bdd0e5d3020949f26fec5dfe9a)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Diffstat (limited to 'Lib/email/header.py')
0 files changed, 0 insertions, 0 deletions