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
commit 2bbb5bc6bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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. */ * calculating the result is trivial in those cases. */
if( b == 0 || n == 0 ) if( b == 0 || n == 0 )
{ {
mbedtls_mpi_lset( X, 0 ); return( mbedtls_mpi_lset( X, 0 ) );
return( 0 );
} }
/* Calculate A*b as A + A*(b-1) to take advantage of mpi_mul_hlp */ /* Calculate A*b as A + A*(b-1) to take advantage of mpi_mul_hlp */