From b63f308812c86e166a6063acf70c298fedfbe96a Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Wed, 15 May 2024 09:07:04 +1000 Subject: [PATCH] fixup --- wolfcrypt/src/ecc.c | 8 ++++---- wolfcrypt/test/test.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 29f7bfcc9..37fb32139 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -4058,10 +4058,10 @@ exit: int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a, mp_int* modulus, int map) { - if ((k != NULL) && (G != NULL) && (mp_iszero(k))) { - mp_zero(G->x); - mp_zero(G->y); - mp_zero(G->z); + if ((k != NULL) && (R != NULL) && (mp_iszero(k))) { + mp_zero(R->x); + mp_zero(R->y); + mp_zero(R->z); return MP_OKAY; } return wc_ecc_mulmod_ex(k, G, R, a, modulus, map, NULL); diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 5f22f3b7f..16f831073 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -29375,7 +29375,7 @@ static wc_test_ret_t ecc_mulmod_test(ecc_key* key1) ret = WC_TEST_RET_ENC_EC(ret); goto done; } - if (!wc_ecc_point_is_at_infinity(&key2->pubkey)) { + if (!wc_ecc_point_is_at_infinity(&key3->pubkey)) { ret = WC_TEST_RET_ENC_EC(ret); goto done; }