From d486df50aa996318e971e4332ebf64c2d2da2520 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 12 Jul 2018 11:03:41 -0700 Subject: [PATCH] fix an error where mp_copy was used instead of mp_sub_d --- wolfcrypt/src/integer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index d5a6bebb9..de3160e51 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -4660,7 +4660,7 @@ int mp_prime_is_prime_ex (mp_int * a, int t, int *result, WC_RNG *rng) goto LBL_B; } - if ((err = mp_copy(a, 2, &c)) != MP_OKAY) { + if ((err = mp_sub_d(a, 2, &c)) != MP_OKAY) { goto LBL_B; }