[Python-checkins] cpython (3.5): Fixed integer overflow in array.buffer_info().
serhiy.storchaka
python-checkins at python.org
Thu Jun 23 17:01:04 EDT 2016
https://hg.python.org/cpython/rev/b8cd52d18fbb
changeset: 102140:b8cd52d18fbb
branch: 3.5
parent: 102138:e3b4033e0ea7
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Jun 23 23:55:34 2016 +0300
summary:
Fixed integer overflow in array.buffer_info().
files:
Modules/arraymodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1268,7 +1268,7 @@
}
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;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list