diff options
author | Richard Levitte <levitte@openssl.org> | 2000-07-26 01:14:16 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-07-26 01:14:16 +0000 |
commit | 47ff5de8c2efa09392dab257c4616881ba3b8037 (patch) | |
tree | a2e09c8a7c51ef227004a2eac607572622773ed8 /crypto/bn/bn_mul.c | |
parent | 34f0fe9de0597bd933f2dd13ae26843ed5273922 (diff) | |
download | openssl-47ff5de8c2efa09392dab257c4616881ba3b8037.tar.gz |
Darrel Hankerson <dhankers@cacr.math.uwaterloo.ca> correctly discovered
that of the result pointer to bn_mul was the same as one of the two arguments,
That argument might have it's sign destroyed. He provided this fix.
Diffstat (limited to 'crypto/bn/bn_mul.c')
-rw-r--r-- | crypto/bn/bn_mul.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c index 3e8baaad9a..3e8d8b9567 100644 --- a/crypto/bn/bn_mul.c +++ b/crypto/bn/bn_mul.c @@ -631,7 +631,6 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) al=a->top; bl=b->top; - r->neg=a->neg^b->neg; if ((al == 0) || (bl == 0)) { @@ -647,6 +646,7 @@ int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) } else rr = r; + rr->neg=a->neg^b->neg; #if defined(BN_MUL_COMBA) || defined(BN_RECURSION) i = al-bl; |