> From: Jeffrey Altman <[EMAIL PROTECTED]>
> 
> jaltman> #ifndef CURSOR_SHOWING
> jaltman> /*
> jaltman>  * Information about the global cursor.
> jaltman>  */
> jaltman> typedef struct tagCURSORINFO
> jaltman> {
> jaltman>     DWORD   cbSize;
> jaltman>     DWORD   flags;
> jaltman>     HCURSOR hCursor;
> jaltman>     POINT   ptScreenPos;
> jaltman> } CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
> jaltman> 
> jaltman> #define CURSOR_SHOWING     0x00000001
> jaltman> #endif /* CURSOR_SHOWING */
> 
> The other alternative is to have PCURSORINFO defined like this:
> 
>       typedef void *PCURSORINFO;
> 
> Because in reality, it matters very little what it actually gets
> defined to.  If buf is too small to contain CURSORINFO, we've screwed
> up independent of the definition of PCURSORINFO.
> 
> I'd rather do that, because there's no guarantee that CURSORINFO
> looks the same in 3 years, so there's no point trying to fool
> ourselves with thinking we know what's in it at any time.

In that case then there is no reason to define PCURSORINFO at all.
We just have to trust that the size of a CURSORINFO structure is never
larger than 

  BYTE  buf[64]

since it is 'buf' that is being passed into GetCursorInfo().

Shouldn't the sizeof(buf) really be

     if (cursor)
             {
             /* cursor position */
             cursor((PCURSORINFO) buf);
             RAND_add(buf, sizeof(buf), 0);
             }

sizeof(CURSORINFO) if we want to be accurate?



                  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