This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
array size problem in select.cc
- From: Charles Reindorf <charles at reindorf dot com>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 10 Aug 2004 11:36:41 +0100
- Subject: array size problem in select.cc
Cygwin developers,
I was browsing in "winsup/cygwin/select.cc" from snapshot 20040808-1 and I
think I see an array size problem there, resutling in possible core dumps when
selecting about 63 file descriptors. I wonder if the following patch is
applicable?
-- Charles Reindorf.
*** ../cygwin.bak/select.cc Tue Aug 10 11:27:26 2004
--- select.cc Tue Aug 10 11:27:38 2004
***************
*** 223,229 ****
DWORD ms)
{
int wait_ret;
! HANDLE w4[MAXIMUM_WAIT_OBJECTS];
select_record *s = &start;
int m = 0;
int res = 0;
--- 223,229 ----
DWORD ms)
{
int wait_ret;
! HANDLE w4[MAXIMUM_WAIT_OBJECTS+1];
select_record *s = &start;
int m = 0;
int res = 0;