Dr. Stephen Henson wrote:
>   OpenSSL CVS Repository
>   http://cvs.openssl.org/
>   ____________________________________________________________________________
> 
>   Server: cvs.openssl.org                  Name:   Dr. Stephen Henson
>   Root:   /v/openssl/cvs                   Email:  [EMAIL PROTECTED]
>   Module: openssl                          Date:   02-Nov-2008 19:29:27
>   Branch: HEAD                             Handle: 2008110218292700
> 
>   Modified files:
>     openssl/crypto/rand     md_rand.c
> 
>   Log:
>     Not sure about this one... seems to be needed to make 64 bit release
>     builds work properly...

k can be < 0, but not j. In both cases, it turns out. But interesting
that it only shows up in 64 bit?

Also, getting the types "right" is all very well, but this is a great
example where it doesn't really work unless you also do range checking
(e.g. a size_t with top bit set is not going to work properly when
converted to a ssize_t).

> 
>   Summary:
>     Revision    Changes     Path
>     1.81        +2  -2      openssl/crypto/rand/md_rand.c
>   ____________________________________________________________________________
> 
>   patch -p0 <<'@@ .'
>   Index: openssl/crypto/rand/md_rand.c
>   ============================================================================
>   $ cvs diff -u -r1.80 -r1.81 md_rand.c
>   --- openssl/crypto/rand/md_rand.c   1 Nov 2008 16:40:34 -0000       1.80
>   +++ openssl/crypto/rand/md_rand.c   2 Nov 2008 18:29:27 -0000       1.81
>   @@ -190,7 +190,7 @@
>    static void ssleay_rand_add(const void *buf, size_t num, double add)
>       {
>       int i,st_idx;
>   -   size_t j,k;
>   +   ssize_t j,k;
>       long md_c[2];
>       unsigned char local_md[MD_DIGEST_LENGTH];
>       EVP_MD_CTX m;
>   @@ -325,7 +325,7 @@
>       {
>       static volatile int stirred_pool = 0;
>       int i,st_num,st_idx;
>   -   size_t j,k;
>   +   ssize_t j,k;
>       int num_ceil;
>       int ok;
>       long md_c[2];
>   @@ .
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> CVS Repository Commit List                     [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
> 
> 


-- 
http://www.apache-ssl.org/ben.html           http://www.links.org/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to