From 9e941d6373ea5e233a26e5fb0af6731d88f14049 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 23 Jun 2016 23:55:34 +0300 Subject: [PATCH] Fixed integer overflow in array.buffer_info(). --- Modules/arraymodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index f73c5993658..28031770a58 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;