> The problem is not within the C Runtime.  The problem is that the API
> call
> 
>   GetQueueStatus() 
> 
> is crashing when it makes a call to 
> 
>   WaitForMultipleObjects()
> 
> The exception is an invalid memory access with a value of 0x00000004.
> 
> My recommendation is that we remove this call from the RAND_poll()
> function for the 0.9.6 release.  It generated only 32 bits of data and
> I doubt that the return value is really all that random for any given
> application.
> 
> The other workaround is to not call the function on NT.  That would
> simply require adding a test for the Windows version number.  The call
> to GetQueueStatus() works just fine on Win9x and Win2000.  
> 

Let me correct this analysis of the situation.  The problem is not
with GetQueueStatus() but with the routine called immediately before
it:

  GetCursorInfo()

Why am I not surprised?  :-)  The following code is being used for
testing: 

   /* cursor position */                                    
       CURSORINFO ci;                                       
       ULONG gle;                                           
                                                            
       printf("cursor info begin\n");                       
                                                            
                                                            
       memset(&ci,0,sizeof(CURSORINFO));                    
       ci.cbSize = sizeof(CURSORINFO);                      
                                                            
       printf("ci.cbSize == %u\n",ci.cbSize);               
                                                            
       if (cursor(&ci)) {                                   
                                                            
           printf("ci.cbSize == %u\n",ci.cbSize);           
                                                            
           RAND_add(&ci, ci.cbSize, 0);                     
       } else {                                             
           gle = GetLastError();                            
           printf("gle = %u\n",gle);                        
       }                                                    
                                                            
       printf("ci.cbSize == %u\n",ci.cbSize);               
       printf("ci.flags == %u\n",ci.flags);                 
       printf("ci.hCursor == %u\n",ci.hCursor);             
       printf("ci.ptScreenPos.x == %u\n",ci.ptScreenPos.x); 
       printf("ci.ptScreenPos.y == %u\n",ci.ptScreenPos.y); 
       printf("cursor info end\n");                         


and what it reports is that GetCursorInfo() although it is loaded it
is failing and writing all over memory starting with the structure 
passed into it:

  cursor info begin
  ci.cbSize == 20
  gle = 1402
  ci.cbSize == 0
  ci.flags == 2147347448
  ci.hCursor == 2003436136
  ci.ptScreenPos.x == 2147347448
  ci.ptScreenPos.y == 172
  cursor info end

GetLastError() reports "Invalid Cursor Handle".   Any call to this
routine is going to have to check for Windows 2000 or Windows 98/ME to
ensure its safe use.  Perhaps it should just be left out entirely.

FYI:

Rather than using GetCursorInfo() which is only supported on some of
the systems you can use GetCursor() and GetCursorPos().  These two
functions will work on all systems and provide you all of the
information retrieved in the CURSORINFO structure except for the
single bit that indicates whether or not the cursor is visible.
This is probably a wiser course of action.



                  Jeffrey Altman * Sr.Software Designer
                 The Kermit Project * Columbia University
               612 West 115th St * New York, NY * 10025 * USA
     http://www.kermit-project.org/ * [EMAIL PROTECTED]


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to