From 83f48b75515222b3e27dc71507e77779306f1629 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 24 Jun 2023 16:19:52 +0000 Subject: Assign and test. --- src/lib/libcrypto/bn/bn_sqr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/bn/bn_sqr.c b/src/lib/libcrypto/bn/bn_sqr.c index 5f3be22304..56664e2e36 100644 --- a/src/lib/libcrypto/bn/bn_sqr.c +++ b/src/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; -- cgit v1.2.3-55-g6feb