Skip to content

Commit b63f308

Browse files
committed
fixup
1 parent 3675468 commit b63f308

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

wolfcrypt/src/ecc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4058,10 +4058,10 @@ int wc_ecc_mulmod_ex2(const mp_int* k, ecc_point* G, ecc_point* R, mp_int* a,
40584058
int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a,
40594059
mp_int* modulus, int map)
40604060
{
4061-
if ((k != NULL) && (G != NULL) && (mp_iszero(k))) {
4062-
mp_zero(G->x);
4063-
mp_zero(G->y);
4064-
mp_zero(G->z);
4061+
if ((k != NULL) && (R != NULL) && (mp_iszero(k))) {
4062+
mp_zero(R->x);
4063+
mp_zero(R->y);
4064+
mp_zero(R->z);
40654065
return MP_OKAY;
40664066
}
40674067
return wc_ecc_mulmod_ex(k, G, R, a, modulus, map, NULL);

wolfcrypt/test/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29375,7 +29375,7 @@ static wc_test_ret_t ecc_mulmod_test(ecc_key* key1)
2937529375
ret = WC_TEST_RET_ENC_EC(ret);
2937629376
goto done;
2937729377
}
29378-
if (!wc_ecc_point_is_at_infinity(&key2->pubkey)) {
29378+
if (!wc_ecc_point_is_at_infinity(&key3->pubkey)) {
2937929379
ret = WC_TEST_RET_ENC_EC(ret);
2938029380
goto done;
2938129381
}

0 commit comments

Comments
 (0)