From b5ae313ab59b7098d554245f60e969d305c03616 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 10 Aug 2000 19:33:54 +0000 Subject: * winsup.h: Change strchr inline for strange gcc problem. * select.cc (select_stuff::wait): Bounds check w4 array. --- winsup/cygwin/select.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'winsup/cygwin/select.cc') 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 (); -- cgit v1.2.3