This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]