diff --git a/ChangeLog b/ChangeLog index de64acf35..59797bd2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ mbed TLS ChangeLog (Sorted per branch, date) = mbed TLS 2.16.x branch released xxxx-xx-xx +Bugfix + * Remove redundant line for getting the bitlen of a bignum, since the variable + holding the returned value is overwritten a line after. + Found by irwir in #2377. + Changes * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx() from the cipher abstraction layer. Fixes #2198. diff --git a/library/bignum.c b/library/bignum.c index d1717e943..7a700bc1e 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -2338,8 +2338,6 @@ static int mpi_miller_rabin( const mbedtls_mpi *X, size_t rounds, MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &R, &W ) ); MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &R, s ) ); - i = mbedtls_mpi_bitlen( X ); - for( i = 0; i < rounds; i++ ) { /*