diff options
author | Christopher Faylor <me@cgf.cx> | 2000-08-10 19:33:54 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-08-10 19:33:54 +0000 |
commit | b5ae313ab59b7098d554245f60e969d305c03616 (patch) | |
tree | a54329bb55765e9ed5c940f4c4ef598d25681238 /winsup/cygwin/select.cc | |
parent | b58f5598cbc77801bdbcc1de4d2fe0027fb68493 (diff) | |
download | cygnal-b5ae313ab59b7098d554245f60e969d305c03616.tar.gz cygnal-b5ae313ab59b7098d554245f60e969d305c03616.tar.bz2 cygnal-b5ae313ab59b7098d554245f60e969d305c03616.zip |
* winsup.h: Change strchr inline for strange gcc problem.
* select.cc (select_stuff::wait): Bounds check w4 array.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 6d2296b95..bb8c35586 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -250,6 +250,11 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, counting the number of active fds. */ while ((s = s->next)) { + if (m > MAXIMUM_WAIT_OBJECTS) + { + set_errno (EINVAL); + return -1; + } if (!s->startup (s, this)) { __seterrno (); |