diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-11-04 23:54:49 +0100 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-11-04 23:54:49 +0100 |
commit | d870740cd75dd4f0cb66fb8c32653a7d47369706 (patch) | |
tree | 0c6cb1ce0b1083c96419c432d1f05c3dff51320d /crypto/bn/bn_add.c | |
parent | Avoid some shadowed variable names. (diff) | |
download | openssl-d870740cd75dd4f0cb66fb8c32653a7d47369706.tar.xz openssl-d870740cd75dd4f0cb66fb8c32653a7d47369706.zip |
Put the first stage of my bignum debugging adventures into CVS. This code
is itself experimental, and in addition may cause execution to break on
existing openssl "bugs" that previously were harmless or at least
invisible.
Diffstat (limited to 'crypto/bn/bn_add.c')
-rw-r--r-- | crypto/bn/bn_add.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c index 6cba07e9f6..a13b8a11cb 100644 --- a/crypto/bn/bn_add.c +++ b/crypto/bn/bn_add.c @@ -100,6 +100,7 @@ int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) r->neg=1; else r->neg=0; + bn_check_top(r); return(1); } @@ -161,6 +162,7 @@ int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) } /* memcpy(rp,ap,sizeof(*ap)*(max-i));*/ r->neg = 0; + bn_check_top(r); return(1); } @@ -253,7 +255,7 @@ int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) r->top=max; r->neg=0; - bn_fix_top(r); + bn_correct_top(r); return(1); } @@ -304,6 +306,7 @@ int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) if (!BN_usub(r,a,b)) return(0); r->neg=0; } + bn_check_top(r); return(1); } |