mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Issue #1621: Fix undefined behaviour from signed overflow in datetime module hashes, array and list iterations, and get_integer (stringlib/string_format.h)
This commit is contained in:
parent
50203a69b3
commit
c7d93b7614
4 changed files with 14 additions and 16 deletions
|
@ -2351,7 +2351,7 @@ array_ass_subscr(arrayobject* self, PyObject* item, PyObject* value)
|
|||
self->ob_item + (cur + 1) * itemsize,
|
||||
lim * itemsize);
|
||||
}
|
||||
cur = start + slicelength * step;
|
||||
cur = start + (size_t)slicelength * step;
|
||||
if (cur < (size_t)Py_SIZE(self)) {
|
||||
memmove(self->ob_item + (cur-slicelength) * itemsize,
|
||||
self->ob_item + cur * itemsize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue