Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-10 23:33:54 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-10 23:33:54 +0400
commitb5ae313ab59b7098d554245f60e969d305c03616 (patch)
treea54329bb55765e9ed5c940f4c4ef598d25681238 /winsup/cygwin/select.cc
parentb58f5598cbc77801bdbcc1de4d2fe0027fb68493 (diff)
* 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.cc5
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 ();