diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index e96369bfc..f3785b1b5 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -2490,22 +2490,23 @@ done: return err; #else - if (P == NULL || modulus == NULL) - return ECC_BAD_ARG_E; + if (P == NULL || modulus == NULL) + return ECC_BAD_ARG_E; - (void)mp; + (void)mp; + (void)ct; #ifndef WOLFSSL_SP_NO_256 - if (mp_count_bits(modulus) == 256) { - return sp_ecc_map_256(P->x, P->y, P->z); - } + if (mp_count_bits(modulus) == 256) { + return sp_ecc_map_256(P->x, P->y, P->z); + } #endif #ifdef WOLFSSL_SP_384 - if (mp_count_bits(modulus) == 384) { - return sp_ecc_map_384(P->x, P->y, P->z); - } + if (mp_count_bits(modulus) == 384) { + return sp_ecc_map_384(P->x, P->y, P->z); + } #endif - return ECC_BAD_ARG_E; + return ECC_BAD_ARG_E; #endif } #endif /* !FREESCALE_LTC_ECC && !WOLFSSL_STM32_PKA */ diff --git a/wolfcrypt/src/sp_c32.c b/wolfcrypt/src/sp_c32.c index e5450b87d..087d6e16a 100644 --- a/wolfcrypt/src/sp_c32.c +++ b/wolfcrypt/src/sp_c32.c @@ -19116,7 +19116,7 @@ int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ, sp_point_256 p[2]; #endif sp_point_256* q = NULL; - int err; + int err = MP_OKAY; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) if (err == MP_OKAY) { @@ -26845,7 +26845,7 @@ int sp_ecc_proj_add_point_384(mp_int* pX, mp_int* pY, mp_int* pZ, sp_point_384 p[2]; #endif sp_point_384* q = NULL; - int err; + int err = MP_OKAY; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) if (err == MP_OKAY) { diff --git a/wolfcrypt/src/sp_c64.c b/wolfcrypt/src/sp_c64.c index a33bd2188..6172e8023 100644 --- a/wolfcrypt/src/sp_c64.c +++ b/wolfcrypt/src/sp_c64.c @@ -18899,7 +18899,7 @@ int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ, sp_point_256 p[2]; #endif sp_point_256* q = NULL; - int err; + int err = MP_OKAY; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) if (err == MP_OKAY) { @@ -26099,7 +26099,7 @@ int sp_ecc_proj_add_point_384(mp_int* pX, mp_int* pY, mp_int* pZ, sp_point_384 p[2]; #endif sp_point_384* q = NULL; - int err; + int err = MP_OKAY; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) if (err == MP_OKAY) { diff --git a/wolfcrypt/src/sp_cortexm.c b/wolfcrypt/src/sp_cortexm.c index 733134d63..7abd4dc61 100644 --- a/wolfcrypt/src/sp_cortexm.c +++ b/wolfcrypt/src/sp_cortexm.c @@ -22861,7 +22861,7 @@ int sp_ecc_proj_add_point_256(mp_int* pX, mp_int* pY, mp_int* pZ, sp_point_256 p[2]; #endif sp_point_256* q = NULL; - int err; + int err = MP_OKAY; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) if (err == MP_OKAY) { @@ -30084,7 +30084,7 @@ int sp_ecc_proj_add_point_384(mp_int* pX, mp_int* pY, mp_int* pZ, sp_point_384 p[2]; #endif sp_point_384* q = NULL; - int err; + int err = MP_OKAY; #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_SP_NO_MALLOC) if (err == MP_OKAY) {