diff options
author | Yury Selivanov <yselivanov@gmail.com> | 2017-03-03 04:46:56 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2017-03-03 05:05:22 (GMT) |
commit | d8b72e4a0673c414120b029065dbe77055f12e82 (patch) | |
tree | 3a7d52223b4f85ce5f23dd9b1c190fe480b53d56 /Modules/_asynciomodule.c | |
parent | 2ef08d3be780457c444741b67e6181675b044be9 (diff) | |
download | cpython-d8b72e4a0673c414120b029065dbe77055f12e82.zip cpython-d8b72e4a0673c414120b029065dbe77055f12e82.tar.gz cpython-d8b72e4a0673c414120b029065dbe77055f12e82.tar.bz2 |
bpo-28963: Fix out of bound iteration in asyncio.Future.remove_done_callback/C (#408)
Diffstat (limited to 'Modules/_asynciomodule.c')
-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 d0e43ae..a77ff96 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -521,7 +521,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); |