diff options
author | Charles-François Natali <neologix@free.fr> | 2011-08-28 16:10:27 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2011-08-28 16:10:27 (GMT) |
commit | ac7e9e058d8da18d0002f2b9456900c34a13e463 (patch) | |
tree | 8b3729f41abc4afd6e0c682f01f6d80b3a09604c /Modules/_ssl.c | |
parent | 44c6ef50af9980f33f6373440f0afc9cfa800c86 (diff) | |
parent | aa26b275034c07784c4d64e9a2bc26c742577327 (diff) | |
download | cpython-ac7e9e058d8da18d0002f2b9456900c34a13e463.zip cpython-ac7e9e058d8da18d0002f2b9456900c34a13e463.tar.gz cpython-ac7e9e058d8da18d0002f2b9456900c34a13e463.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 b203ce4..3d44b61 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -1040,10 +1040,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; |