Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e941d6

Browse files
Fixed integer overflow in array.buffer_info().
1 parent dcb6c88 commit 9e941d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/arraymodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ array_array_buffer_info_impl(arrayobject *self)
12681268
}
12691269
PyTuple_SET_ITEM(retval, 0, v);
12701270

1271-
v = PyLong_FromLong((long)(Py_SIZE(self)));
1271+
v = PyLong_FromSsize_t(Py_SIZE(self));
12721272
if (v == NULL) {
12731273
Py_DECREF(retval);
12741274
return NULL;

0 commit comments

Comments
 (0)