diff options
Diffstat (limited to 'crypto/bn/bn_sqr.c')
-rw-r--r-- | crypto/bn/bn_sqr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c index 256d26e8db..5e692971c9 100644 --- a/crypto/bn/bn_sqr.c +++ b/crypto/bn/bn_sqr.c @@ -135,14 +135,8 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx) } rr->neg = 0; - /* - * If the most-significant half of the top word of 'a' is zero, then the - * square of 'a' will max-1 words. - */ - if (a->d[al - 1] == (a->d[al - 1] & BN_MASK2l)) - rr->top = max - 1; - else - rr->top = max; + rr->top = max; + bn_correct_top(rr); if (r != rr && BN_copy(r, rr) == NULL) goto err; |