diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2023-06-24 16:19:53 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2023-06-24 16:19:53 +0000 |
commit | 42d9d6bf15f1ff3c7939a84c5f3dbeafa4840aee (patch) | |
tree | 4da58f6987732e46ef3660006185ae8f69176cdf /lib/libcrypto | |
parent | 53a1869cd163b1bfd7248c3b0ac866ce095a14e8 (diff) |
Assign and test.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/bn/bn_sqr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/bn/bn_sqr.c b/lib/libcrypto/bn/bn_sqr.c index 5f3be22304c..56664e2e36b 100644 --- a/lib/libcrypto/bn/bn_sqr.c +++ b/lib/libcrypto/bn/bn_sqr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_sqr.c,v 1.32 2023/06/24 16:10:23 jsing Exp $ */ +/* $OpenBSD: bn_sqr.c,v 1.33 2023/06/24 16:19:52 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -284,8 +284,7 @@ BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx) if (rr == NULL) goto err; - r_len = a->top * 2; - if (r_len < a->top) + if ((r_len = a->top * 2) < a->top) goto err; if (!bn_wexpand(rr, r_len)) goto err; |