From: Serhiy Storchaka Date: Thu, 23 Jun 2016 20:55:34 +0000 (+0300) Subject: Fixed integer overflow in array.buffer_info(). X-Git-Tag: v3.6.0a3~91^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e941d6373ea5e233a26e5fb0af6731d88f14049;p=thirdparty%2FPython%2Fcpython.git Fixed integer overflow in array.buffer_info(). --- diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index f73c59936585..28031770a589 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;