diff options
author | HongWeipeng <hongweichen8888@sina.com> | 2019-09-08 10:15:56 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-09-08 10:15:56 (GMT) |
commit | 3c87a667bb367ace1de6bd1577fdb4f66947da52 (patch) | |
tree | e5fd31e977fc7d8041cb85c432de6715b055d55d /Modules | |
parent | 32a960f8e1015b64b4b955b3d62920c5903d4c6f (diff) | |
download | cpython-3c87a667bb367ace1de6bd1577fdb4f66947da52.zip cpython-3c87a667bb367ace1de6bd1577fdb4f66947da52.tar.gz cpython-3c87a667bb367ace1de6bd1577fdb4f66947da52.tar.bz2 |
bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639)
This is a complement to PR 13375.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 95bfe9d..d2f6391 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -5195,7 +5195,8 @@ Pointer_subscript(PyObject *myself, PyObject *item) PyObject *np; StgDictObject *stgdict, *itemdict; PyObject *proto; - Py_ssize_t i, len, cur; + Py_ssize_t i, len; + size_t cur; /* Since pointers have no length, and we want to apply different semantics to negative indices than normal |