summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-08-28 15:51:43 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-08-28 15:51:43 (GMT)
commitaa26b275034c07784c4d64e9a2bc26c742577327 (patch)
treed331c0e5f2dd0fc0f754ffebaf9ebb9e5c4f7958 /Modules/_ssl.c
parent524148ad7a3e5420abf867b1e30017b5ca2311a4 (diff)
downloadcpython-aa26b275034c07784c4d64e9a2bc26c742577327.zip
cpython-aa26b275034c07784c4d64e9a2bc26c742577327.tar.gz
cpython-aa26b275034c07784c4d64e9a2bc26c742577327.tar.bz2
Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 27dcdbc..b27353a 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;