mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
This commit is contained in:
commit
ac7e9e058d
6 changed files with 21 additions and 19 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue