mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
greater than FD_SETSIZE.
This commit is contained in:
parent
524148ad7a
commit
aa26b27503
6 changed files with 21 additions and 19 deletions
|
|
@ -44,6 +44,13 @@ int _PyVerify_fd(int fd);
|
|||
#endif
|
||||
#endif /* Py_LIMITED_API */
|
||||
|
||||
/* A routine to check if a file descriptor can be select()-ed. */
|
||||
#ifdef HAVE_SELECT
|
||||
#define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
|
||||
#else
|
||||
#define _PyIsSelectable_fd(FD) (1)
|
||||
#endif /* HAVE_SELECT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue