diff options
author | Ray Donnelly <mingw.android@gmail.com> | 2021-07-28 19:58:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 19:58:05 (GMT) |
commit | 92b5dc780db968f6277f42cb06926dddb7475dc6 (patch) | |
tree | 35c53b0590afb58d366aad27ba4da38a4e85bd63 /Modules/_winapi.c | |
parent | 31bec6f1b178dadec3cb43353274b4e958a8f015 (diff) | |
download | cpython-92b5dc780db968f6277f42cb06926dddb7475dc6.zip cpython-92b5dc780db968f6277f42cb06926dddb7475dc6.tar.gz cpython-92b5dc780db968f6277f42cb06926dddb7475dc6.tar.bz2 |
bpo-40263: Fixes an off-by-one error in _winapi_WaitForMultipleObjects_impl (GH-19501)
Diffstat (limited to 'Modules/_winapi.c')
-rw-r--r-- | Modules/_winapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c index f341493..bf2498a 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -1722,7 +1722,7 @@ _winapi_WaitForMultipleObjects_impl(PyObject *module, PyObject *handle_seq, nhandles = PySequence_Length(handle_seq); if (nhandles == -1) return NULL; - if (nhandles < 0 || nhandles >= MAXIMUM_WAIT_OBJECTS - 1) { + if (nhandles < 0 || nhandles > MAXIMUM_WAIT_OBJECTS - 1) { PyErr_Format(PyExc_ValueError, "need at most %zd handles, got a sequence of length %zd", MAXIMUM_WAIT_OBJECTS - 1, nhandles); |