diff --git a/library/bignum_core.c b/library/bignum_core.c index 68c49dfc1..15557e67d 100644 --- a/library/bignum_core.c +++ b/library/bignum_core.c @@ -130,11 +130,11 @@ static mbedtls_mpi_uint mpi_bigendian_to_host( mbedtls_mpi_uint a ) } void mbedtls_mpi_core_bigendian_to_host( mbedtls_mpi_uint *A, - size_t limbs ) + size_t A_limbs ) { mbedtls_mpi_uint *cur_limb_left; mbedtls_mpi_uint *cur_limb_right; - if( limbs == 0 ) + if( A_limbs == 0 ) return; /* @@ -146,7 +146,7 @@ void mbedtls_mpi_core_bigendian_to_host( mbedtls_mpi_uint *A, * than the right index (it's not a problem if limbs is odd and the * indices coincide in the last iteration). */ - for( cur_limb_left = A, cur_limb_right = A + ( limbs - 1 ); + for( cur_limb_left = A, cur_limb_right = A + ( A_limbs - 1 ); cur_limb_left <= cur_limb_right; cur_limb_left++, cur_limb_right-- ) { diff --git a/library/bignum_core.h b/library/bignum_core.h index 37f361726..9fd9d2070 100644 --- a/library/bignum_core.h +++ b/library/bignum_core.h @@ -45,7 +45,7 @@ size_t mbedtls_mpi_core_clz( const mbedtls_mpi_uint a ); * \note This function returns 0 if all the limbs of \p A are 0. * * \param[in] A The address of the MPI. - * \param a_limbs The number of limbs of \p A. + * \param A_limbs The number of limbs of \p A. * * \return The number of bits in \p A. */ @@ -55,10 +55,10 @@ size_t mbedtls_mpi_core_bitlen( const mbedtls_mpi_uint *A, size_t A_limbs ); * into the storage form used by mbedtls_mpi. * * \param[in,out] A The address of the MPI. - * \param limbs The number of limbs of \p A. + * \param A_limbs The number of limbs of \p A. */ void mbedtls_mpi_core_bigendian_to_host( mbedtls_mpi_uint *A, - size_t limbs ); + size_t A_limbs ); /** Import X from unsigned binary data, little-endian. *