mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Remove tests for 0 limbs
That rule is common to the whole module and not a likely mistake to make. Also, the test was not really precise as G, I, T were oversized. Better remove it than give a false sense of security. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@@ -1616,18 +1616,6 @@ void mpi_core_gcd_modinv_odd_preconditions()
|
||||
memcpy(I, two_limbs, 2 * sizeof(mbedtls_mpi_uint));
|
||||
mbedtls_mpi_core_gcd_modinv_odd(G, I, I, 2, I, 2, T);
|
||||
|
||||
/*
|
||||
* Not specific to this function
|
||||
*/
|
||||
|
||||
/* A_limbs = 0 */
|
||||
mbedtls_mpi_core_gcd_modinv_odd(G, NULL, one_limb, 0, two_limbs, 2, T);
|
||||
mbedtls_mpi_core_gcd_modinv_odd(G, I, one_limb, 0, two_limbs, 2, T);
|
||||
|
||||
/* A_limbs = N_limbs = 0 */
|
||||
mbedtls_mpi_core_gcd_modinv_odd(G, NULL, one_limb, 0, two_limbs, 0, T);
|
||||
mbedtls_mpi_core_gcd_modinv_odd(G, I, one_limb, 0, two_limbs, 0, T);
|
||||
|
||||
exit:
|
||||
mbedtls_free(G);
|
||||
mbedtls_free(I);
|
||||
|
||||
Reference in New Issue
Block a user