diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-23 20:56:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-06-23 20:56:46 (GMT) |
commit | 5ffdcad7b92e8da783c7b0e4faa0c2933f6ce336 (patch) | |
tree | b7439959e621e8ec8c664998183f5e93ac3f78f5 /Modules/arraymodule.c | |
parent | 58d3f59c2f9b9b0e9d5f5c5f052a790c0bc005ca (diff) | |
parent | 9e941d6373ea5e233a26e5fb0af6731d88f14049 (diff) | |
download | cpython-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.c | 2 |
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; |