diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-11-04 22:54:49 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-11-04 22:54:49 +0000 |
commit | d870740cd75dd4f0cb66fb8c32653a7d47369706 (patch) | |
tree | 0c6cb1ce0b1083c96419c432d1f05c3dff51320d /crypto/bn/bn_word.c | |
parent | d8ec0dcf457f4dec39f137657b702fcbeaf5cc04 (diff) |
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_word.c')
-rw-r--r-- | crypto/bn/bn_word.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/bn/bn_word.c b/crypto/bn/bn_word.c index 988e0ca7b3..560a499692 100644 --- a/crypto/bn/bn_word.c +++ b/crypto/bn/bn_word.c @@ -102,6 +102,7 @@ BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w) } if ((a->top > 0) && (a->d[a->top-1] == 0)) a->top--; + bn_check_top(a); return(ret); } @@ -136,6 +137,7 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) } if (i >= a->top) a->top++; + bn_check_top(a); return(1); } @@ -175,6 +177,7 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w) } if ((a->d[i] == 0) && (i == (a->top-1))) a->top--; + bn_check_top(a); return(1); } @@ -197,6 +200,7 @@ int BN_mul_word(BIGNUM *a, BN_ULONG w) } } } + bn_check_top(a); return(1); } |