From aa26b275034c07784c4d64e9a2bc26c742577327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Fran=C3=A7ois=20Natali?= Date: Sun, 28 Aug 2011 17:51:43 +0200 Subject: Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is greater than FD_SETSIZE. --- Modules/_ssl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Modules/_ssl.c') diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 27dcdbc573..b27353a493 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -1023,10 +1023,8 @@ check_socket_and_wait_for_timeout(PySocketSockObject *s, int writing) #endif /* Guard against socket too large for select*/ -#ifndef Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE - if (s->sock_fd >= FD_SETSIZE) + if (!_PyIsSelectable_fd(s->sock_fd)) return SOCKET_TOO_LARGE_FOR_SELECT; -#endif /* Construct the arguments to select */ tv.tv_sec = (int)s->sock_timeout; -- cgit v1.2.1