1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-27 19:21:55 +03:00

Merge pull request #4380 from paul-elliott-arm/bignum_unchecked_return

Fix unchecked return value in bignum
This commit is contained in:
Ronald Cron
2021-04-22 13:08:57 +02:00
committed by GitHub

View File

@@ -1666,8 +1666,7 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint
* calculating the result is trivial in those cases. */
if( b == 0 || n == 0 )
{
mbedtls_mpi_lset( X, 0 );
return( 0 );
return( mbedtls_mpi_lset( X, 0 ) );
}
/* Calculate A*b as A + A*(b-1) to take advantage of mpi_mul_hlp */