diff options
author | Charles-François Natali <neologix@free.fr> | 2011-08-28 15:51:43 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-08-28 15:51:43 (GMT) |
commit | aa26b275034c07784c4d64e9a2bc26c742577327 (patch) | |
tree | d331c0e5f2dd0fc0f754ffebaf9ebb9e5c4f7958 /Modules/_ssl.c | |
parent | 524148ad7a3e5420abf867b1e30017b5ca2311a4 (diff) | |
download | cpython-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.c | 4 |
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; |