How do I submit bug reports?  I couldn't find anything at www.openssl.com,
but maybe I'm missing something obvious.  I have some more bug reports to
submit.

I'm using v0.9.4.

Minor bug (found by purify, but unlikely to really cause problems on
most architectures) in BN_bn2hex():

    < buf=(char *)Malloc(a->top*BN_BYTES*2+2);
    ---
    > buf=(char *)Malloc(a->top*BN_BYTES*2+((a->top==0)?4:2));

The math should be the same, except for the case where a->top == 0.  In this
case, 4 bytes instead of 2 should be allocated.  I'll step you through the
relevant lines:

   # with a->top==0, only 2 bytes get allocated 
   76              buf=(char *)Malloc(a->top*BN_BYTES*2+2);
   # probably shouldn't happen, but lets be safe
   83              if (a->neg) *(p++)='-';
   # definately use 2 characters
   84              if (a->top == 0) { *(p++)='0'; *(p++)='0'; }
   # use 1 character
   99              *p='\0';

FYI, I do not currently subscribe to the openssl-dev list, so responses should
CC: [EMAIL PROTECTED]

Thanks!

brian
[EMAIL PROTECTED]      (play)
[EMAIL PROTECTED]  (work)
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to