Skip to content

Commit 5760382

Browse files
authored
Merge pull request #7387 from JacobBarthelmeh/sm2
fix for oss-fuzz sm2 test build
2 parents f6a24ef + d4f5825 commit 5760382

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wolfcrypt/src/ecc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,6 +2617,7 @@ int ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* a,
26172617
*/
26182618
int ecc_map_ex(ecc_point* P, mp_int* modulus, mp_digit mp, int ct)
26192619
{
2620+
int err = MP_OKAY;
26202621
#if !defined(WOLFSSL_SP_MATH)
26212622
DECL_MP_INT_SIZE_DYN(t1, mp_bitsused(modulus), MAX_ECC_BITS_USE);
26222623
DECL_MP_INT_SIZE_DYN(t2, mp_bitsused(modulus), MAX_ECC_BITS_USE);
@@ -2626,7 +2627,6 @@ int ecc_map_ex(ecc_point* P, mp_int* modulus, mp_digit mp, int ct)
26262627
DECL_MP_INT_SIZE_DYN(rz, mp_bitsused(modulus), MAX_ECC_BITS_USE);
26272628
#endif
26282629
mp_int *x, *y, *z;
2629-
int err;
26302630

26312631
(void)ct;
26322632

@@ -2844,7 +2844,7 @@ int ecc_map_ex(ecc_point* P, mp_int* modulus, mp_digit mp, int ct)
28442844
err = ECC_BAD_ARG_E;
28452845
#endif
28462846

2847-
WOLFSSL_LEAVE("ecc_map_ex (SP Math)");
2847+
WOLFSSL_LEAVE("ecc_map_ex (SP Math)", err);
28482848
return err;
28492849
#endif /* WOLFSSL_SP_MATH */
28502850
}

0 commit comments

Comments
 (0)