summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_sqr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_sqr.c')
-rw-r--r--src/lib/libcrypto/bn/bn_sqr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_sqr.c b/src/lib/libcrypto/bn/bn_sqr.c
index bd5f43bb93..5332d17f6b 100644
--- a/src/lib/libcrypto/bn/bn_sqr.c
+++ b/src/lib/libcrypto/bn/bn_sqr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_sqr.c,v 1.24 2023/02/09 09:58:53 jsing Exp $ */ 1/* $OpenBSD: bn_sqr.c,v 1.25 2023/02/13 04:25:37 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -420,10 +420,10 @@ BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
420 } 420 }
421 421
422 rr->top = rn; 422 rr->top = rn;
423 rr->neg = 0;
424
425 bn_correct_top(rr); 423 bn_correct_top(rr);
426 424
425 rr->neg = 0;
426
427 if (rr != r) 427 if (rr != r)
428 BN_copy(r, rr); 428 BN_copy(r, rr);
429 429