The same also goes for   CRYPTO_malloc(int, char *, int).   It probably should
be   CRYPTO_malloc(size_t, char *, int).   The same would go for
CRYPTO_realloc() and  CRYPTO_remalloc().

Darin Broady
[EMAIL PROTECTED]
Lexmark International, Inc.





"Darin_Broady/Lex/Lexmark.LEXMARK"@sweeper.lex.lexmark.com on 06/10/2002
03:57:18 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Darin Broady/Lex/Lexmark)
Subject:  Prototypes SSL_write() & SSL_read() problem in openssl/ssl.h for
      64-bit applications






The prototype for SSL_write() and SSL_read()  both have their last parameters to
be int.  I believe that this last parameter needs to be of type   size_t.   Two
reasons for doing this:

1)  This will allow applications to be compiled in either 32-bit or 64-bit mode
without any warnings from the compiler about implicit conversions.  On 64-bit
applications, size_t to int  is really a typecast from a long to an int, where
long = 8-bytes and int = 4-bytes.   Possible loss of data.
2)  This will make these functions look more like the    write() & read()
system calls of Unix.

There might be more instances of this, but these are the only 2 functions that I
have run into thus far.


Darin Broady
[EMAIL PROTECTED]
Lexmark International, Inc.


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






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

Reply via email to