summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2011-09-25 14:34:32 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2011-09-25 14:34:32 (GMT)
commitc7d93b761413834e0ac39f5fc648565a2843121f (patch)
tree0bcb66dfcb476fb49a59ce019943f293f003dbc0 /Modules/arraymodule.c
parent50203a69b344e80be5000fe87aafad09e84cde85 (diff)
downloadcpython-c7d93b761413834e0ac39f5fc648565a2843121f.zip
cpython-c7d93b761413834e0ac39f5fc648565a2843121f.tar.gz
cpython-c7d93b761413834e0ac39f5fc648565a2843121f.tar.bz2
Issue #1621: Fix undefined behaviour from signed overflow in datetime module hashes, array and list iterations, and get_integer (stringlib/string_format.h)
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 5748a3c..8806bd5 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -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,