summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-23 20:55:34 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-23 20:55:34 (GMT)
commit9e941d6373ea5e233a26e5fb0af6731d88f14049 (patch)
tree2e68a4e8d913ec8a80bc1ab2e67595f8e5eca584 /Modules/arraymodule.c
parentdcb6c88a240fea82da8867d1de1022a4555f22b4 (diff)
downloadcpython-9e941d6373ea5e233a26e5fb0af6731d88f14049.zip
cpython-9e941d6373ea5e233a26e5fb0af6731d88f14049.tar.gz
cpython-9e941d6373ea5e233a26e5fb0af6731d88f14049.tar.bz2
Fixed integer overflow in array.buffer_info().
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 f73c599..2803177 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1268,7 +1268,7 @@ array_array_buffer_info_impl(arrayobject *self)
}
PyTuple_SET_ITEM(retval, 0, v);
- v = PyLong_FromLong((long)(Py_SIZE(self)));
+ v = PyLong_FromSsize_t(Py_SIZE(self));
if (v == NULL) {
Py_DECREF(retval);
return NULL;