From 8447da6985492ddd1d4e6a20777c0381d188c19e Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 29 Jul 2022 08:37:33 +0000 Subject: [PATCH] Having a perfect square at this point is not an error. Rather it is a shortcut bypassing expensive computation, so change goto err to goto done. Bug introduced in last refactoring before commit. --- lib/libcrypto/bn/bn_bpsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/bn/bn_bpsw.c b/lib/libcrypto/bn/bn_bpsw.c index ef3b829cad2..93d43afff3f 100644 --- a/lib/libcrypto/bn/bn_bpsw.c +++ b/lib/libcrypto/bn/bn_bpsw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_bpsw.c,v 1.4 2022/07/29 08:32:20 tb Exp $ */ +/* $OpenBSD: bn_bpsw.c,v 1.5 2022/07/29 08:37:33 tb Exp $ */ /* * Copyright (c) 2022 Martin Grenouilloux * Copyright (c) 2022 Theo Buehler @@ -248,7 +248,7 @@ bn_strong_lucas_selfridge(int *is_prime, const BIGNUM *n, BN_CTX *ctx) goto err; if (is_perfect_square) { *is_prime = 0; - goto err; + goto done; } /* -- 2.20.1