diff options
author | Yury Selivanov <yselivanov@gmail.com> | 2017-03-03 04:46:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-03 04:46:56 (GMT) |
commit | 84af903f3bc6780cb4e73ff05ad2e242d3966417 (patch) | |
tree | 5d1ed28b40829da6114494647cd5ff2c909f3471 /Modules | |
parent | 2f156457856da360a5549dd72f265c56f1b120f8 (diff) | |
download | cpython-84af903f3bc6780cb4e73ff05ad2e242d3966417.zip cpython-84af903f3bc6780cb4e73ff05ad2e242d3966417.tar.gz cpython-84af903f3bc6780cb4e73ff05ad2e242d3966417.tar.bz2 |
bpo-28963: Fix out of bound iteration in asyncio.Future.remove_done_callback/C (#408)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_asynciomodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 2204792..e902c04 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -522,7 +522,7 @@ _asyncio_Future_remove_done_callback(FutureObj *self, PyObject *fn) return NULL; } - for (i = 0; i < len; i++) { + for (i = 0; i < PyList_GET_SIZE(self->fut_callbacks); i++) { int ret; PyObject *item = PyList_GET_ITEM(self->fut_callbacks, i); |