Fixed integer overflow in array.buffer_info().

This commit is contained in:
Serhiy Storchaka 2016-06-23 23:55:34 +03:00
parent dcb6c88a24
commit 9e941d6373
1 changed files with 1 additions and 1 deletions

View File

@ -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;