Skip to content

Commit

Permalink
add off by one patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Sep 24, 2020
1 parent b203ee2 commit 0f1f15b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ source:
# md5 from: https://www.python.org/downloads/release/python-385/
md5: 835f3cb29e4065b9a2dea1c7b9bfc37f
patches:
- patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch
{% if 'conda-forge' not in channel_targets %}
- patches/0001-Add-Anaconda-Distribution-version-logic.patch
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 48755cdaaeb7e4ab82d1b96cc80c0ab67a0c7b0d Mon Sep 17 00:00:00 2001
From: Ray Donnelly <[email protected]>
Date: Sun, 12 Apr 2020 18:22:21 +0200
Subject: [PATCH 00/26] Fix off-by-one-error in
_winapi_WaitForMultipleObjects_impl

---
Modules/_winapi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index 647075cdb1..aec836ad82 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -1706,7 +1706,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);
--
2.24.3 (Apple Git-128)

0 comments on commit 0f1f15b

Please sign in to comment.