The example is wrong in that the "8" should be a "1", but the problem  
is still there.

John

On Tuesday, December 24, 2002, at 03:58 PM, OpenSSL-Bugs wrote:

>
>        Greetings,
>         This message has been automatically generated in response to  
> the
> creation of a trouble ticket regarding:
>       "Bug in Beta 5",
> a summary of which appears below.
>
> There is no need to reply to this message right now.  Your ticket has  
> been
> assigned an ID of [openssl.org #419].
>
> Please include the string:
>
>          [openssl.org #419]
>
> in the subject line of all future correspondence about this issue. To  
> do so,
> you may reply to this message.
>
>                         Thank you,
>
>
> ----------------------------------------------------------------------- 
> --
> Here's some code that worked fine before 0.9.7.  The BN_CTX_init()
> isn't "right" per se, but then again it shouldn't cause a crash in
> BN_copy, since that context isn't actually used in the copy!
>
> The code works fine if you comment out the BN_CTX_init call, or if you
> initialize a BN_CTX properly.  Beyond that, I haven't looked into the
> matter.
>
> John
>
> #include <openssl/bn.h>
> int main() {
>    unsigned char brep[1] = {0x65};
>    BIGNUM x, y;
>    BN_CTX c;
>
>    BN_init(&x);
>    BN_init(&y);
>    BN_CTX_init(&c);
>
>    BN_bin2bn(brep, 8, &x);
>    BN_add_word(&x, 12);
>    BN_copy(&y, &x);
>
>    return 0;
> }
>
>

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

Reply via email to