summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-23 20:56:46 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-23 20:56:46 (GMT)
commit5ffdcad7b92e8da783c7b0e4faa0c2933f6ce336 (patch)
treeb7439959e621e8ec8c664998183f5e93ac3f78f5 /Modules/arraymodule.c
parent58d3f59c2f9b9b0e9d5f5c5f052a790c0bc005ca (diff)
parent9e941d6373ea5e233a26e5fb0af6731d88f14049 (diff)
downloadcpython-5ffdcad7b92e8da783c7b0e4faa0c2933f6ce336.zip
cpython-5ffdcad7b92e8da783c7b0e4faa0c2933f6ce336.tar.gz
cpython-5ffdcad7b92e8da783c7b0e4faa0c2933f6ce336.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 78e5561..cac23bf 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;