From 5e26a5c8fc1e6dd84d7da899b86a4c36b2ec717e Mon Sep 17 00:00:00 2001 From: toddouska Date: Thu, 27 Aug 2015 11:18:06 -0700 Subject: [PATCH] fix alt_ecc_size exptmod with negative numbers --- wolfcrypt/src/tfm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index c45fa6dee..d24f6d2c9 100755 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -1209,7 +1209,7 @@ int fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y) fp_int tmp; /* yes, copy G and invmod it */ - fp_copy(G, &tmp); + fp_init_copy(&tmp, G); if ((err = fp_invmod(&tmp, P, &tmp)) != FP_OKAY) { return err; }