[Python-checkins] cpython (merge 3.5 -> default): 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/8955d8aaf351
changeset: 102141:8955d8aaf351
parent: 102139:f6b8b1e5d24d
parent: 102140:b8cd52d18fbb
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Jun 23 23:56:46 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